@@ -19,8 +19,6 @@ import (
1919
2020 "github.com/stretchr/testify/assert"
2121 "github.com/stretchr/testify/require"
22-
23- . "github.com/ory/x/pointerx"
2422)
2523
2624func TestDetermineIDs (t * testing.T ) {
@@ -63,7 +61,7 @@ func TestDetermineIDs(t *testing.T) {
6361 setup := func (t * testing.T ) (* CommandHelper , * Config ) {
6462 h := & CommandHelper {
6563 configLocation : t .TempDir () + "/config.json" ,
66- cloudConsoleAPIURL : Ptr (ts .URL ),
64+ cloudConsoleAPIURL : new (ts.URL ),
6765 }
6866 cfg , err := h .getOrCreateConfig ()
6967 require .NoError (t , err )
@@ -107,15 +105,15 @@ func TestDetermineIDs(t *testing.T) {
107105 t .Run ("errors when workspace override is set" , func (t * testing.T ) {
108106 h , cfg := setup (t )
109107
110- h .workspaceAPIKey = Ptr ("workspace-api-key" )
111- h .workspaceOverride = Ptr ("workspace-override" )
108+ h .workspaceAPIKey = new ("workspace - api - key ")
109+ h.workspaceOverride = new ("workspace - override ")
112110
113111 assert .ErrorContains (t , h .determineWorkspaceID (ctx , cfg ), "workspace API key is set but workspace flag is also set, please remove one" )
114112 })
115113
116114 h , cfg := setup (t )
117115
118- h .workspaceAPIKey = Ptr ("workspace-api-key" )
116+ h .workspaceAPIKey = new ("workspace - api - key ")
119117
120118 require .NoError (t , h .determineWorkspaceID (ctx , cfg ))
121119 assert .Equal (t , wsID , h .workspaceID )
@@ -126,23 +124,23 @@ func TestDetermineIDs(t *testing.T) {
126124 t .Run ("errors when project override is set" , func (t * testing.T ) {
127125 h , cfg := setup (t )
128126
129- h .projectAPIKey = Ptr ("project-api-key" )
130- h .projectOverride = Ptr ("project-override" )
127+ h .projectAPIKey = new ("project - api - key ")
128+ h.projectOverride = new ("project - override ")
131129
132130 assert .ErrorContains (t , h .determineProjectID (ctx , cfg ), "project API key is set but project flag is also set, please remove one" )
133131 })
134132 t .Run ("errors when workspace is set" , func (t * testing.T ) {
135133 h , cfg := setup (t )
136134
137- h .projectAPIKey = Ptr ("project-api-key" )
135+ h .projectAPIKey = new ("project - api - key ")
138136 h.workspaceID = uuid .Must (uuid .NewV4 ())
139137
140138 assert .ErrorContains (t , h .determineProjectID (ctx , cfg ), "project API key is set but workspace is also set, please remove one" )
141139 })
142140
143141 h , cfg := setup (t )
144142
145- h .projectAPIKey = Ptr ("project-api-key" )
143+ h .projectAPIKey = new ("project - api - key ")
146144
147145 require .NoError (t , h .determineProjectID (ctx , cfg ))
148146 assert .Equal (t , pjID , h .projectID )
@@ -177,7 +175,7 @@ func TestDetermineIDs(t *testing.T) {
177175 } {
178176 t .Run (tc .name , func (t * testing.T ) {
179177 for _ , setValue := range []func (* CommandHelper ){
180- func (h * CommandHelper ) { h .workspaceOverride = Ptr (tc .value ) },
178+ func (h * CommandHelper ) { h .workspaceOverride = new (tc.value ) },
181179 func (* CommandHelper ) { t .Setenv (WorkspaceKey , tc .value ) },
182180 } {
183181 h , cfg := setup (t )
@@ -224,7 +222,7 @@ func TestDetermineIDs(t *testing.T) {
224222 } {
225223 t .Run (tc .name , func (t * testing.T ) {
226224 for _ , setValue := range []func (* CommandHelper ){
227- func (h * CommandHelper ) { h .projectOverride = Ptr (tc .value ) },
225+ func (h * CommandHelper ) { h .projectOverride = new (tc.value ) },
228226 func (* CommandHelper ) { t .Setenv (ProjectKey , tc .value ) },
229227 } {
230228 h , cfg := setup (t )
0 commit comments