@@ -141,8 +141,9 @@ func TestObjectID(t *testing.T) {
141141 }
142142}
143143
144- /*
145144func TestCredentials (t * testing.T ) {
145+ t .Skip ("Will reenable on ticket CLOUDP-333193" )
146+
146147 t .Run ("no credentials" , func (t * testing.T ) {
147148 if err := Credentials (); err == nil {
148149 t .Fatal ("Credentials() expected an error\n " )
@@ -169,26 +170,27 @@ func TestCredentials(t *testing.T) {
169170 }
170171 })
171172}
172- */
173173
174174func TestNoAPIKeyss (t * testing.T ) {
175175 t .Run ("no credentials" , func (t * testing.T ) {
176176 if err := NoAPIKeys (); err != nil {
177177 t .Fatalf ("NoAPIKeys() unexpected error %v\n " , err )
178178 }
179179 })
180- /*
181- t.Run("with api key credentials", func(t *testing.T) {
182- // this function depends on the global config (globals are bad I know)
183- // the easiest way we have to test it is via ENV vars
184- viper.AutomaticEnv()
185- t.Setenv("PUBLIC_API_KEY", "test")
186- t.Setenv("PRIVATE_API_KEY", "test")
187- if err := NoAPIKeys(); err == nil {
188- t.Fatalf("NoAPIKeys() expected error\n")
189- }
190- })
191- */
180+
181+ t .Run ("with api key credentials" , func (t * testing.T ) {
182+ t .Skip ("Will reenable on ticket CLOUDP-333193" )
183+
184+ // this function depends on the global config (globals are bad I know)
185+ // the easiest way we have to test it is via ENV vars
186+ viper .AutomaticEnv ()
187+ t .Setenv ("PUBLIC_API_KEY" , "test" )
188+ t .Setenv ("PRIVATE_API_KEY" , "test" )
189+ if err := NoAPIKeys (); err == nil {
190+ t .Fatalf ("NoAPIKeys() expected error\n " )
191+ }
192+ })
193+
192194 t .Run ("with auth token credentials" , func (t * testing.T ) {
193195 // this function depends on the global config (globals are bad I know)
194196 // the easiest way we have to test it is via ENV vars
@@ -217,18 +219,19 @@ func TestNoAccessToken(t *testing.T) {
217219 t .Fatalf ("NoAccessToken() unexpected error %v\n " , err )
218220 }
219221 })
220- /*
221- t.Run("with auth token credentials", func(t *testing.T) {
222- // this function depends on the global config (globals are bad I know)
223- // the easiest way we have to test it is via ENV vars
224- viper.AutomaticEnv()
225- t.Setenv("ACCESS_TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c")
226- t.Setenv("REFRESH_TOKEN", "test")
227- if err := NoAccessToken(); err == nil {
228- t.Fatalf("NoAccessToken() expected error\n")
229- }
230- })
231- */
222+
223+ t .Run ("with auth token credentials" , func (t * testing.T ) {
224+ t .Skip ("Will reenable on ticket CLOUDP-333193" )
225+
226+ // this function depends on the global config (globals are bad I know)
227+ // the easiest way we have to test it is via ENV vars
228+ viper .AutomaticEnv ()
229+ t .Setenv ("ACCESS_TOKEN" , "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" )
230+ t .Setenv ("REFRESH_TOKEN" , "test" )
231+ if err := NoAccessToken (); err == nil {
232+ t .Fatalf ("NoAccessToken() expected error\n " )
233+ }
234+ })
232235}
233236
234237func TestFlagInSlice (t * testing.T ) {
0 commit comments