@@ -141,8 +141,9 @@ func TestObjectID(t *testing.T) {
141
141
}
142
142
}
143
143
144
- /*
145
144
func TestCredentials (t * testing.T ) {
145
+ t .Skip ("Will reenable on ticket CLOUDP-333193" )
146
+
146
147
t .Run ("no credentials" , func (t * testing.T ) {
147
148
if err := Credentials (); err == nil {
148
149
t .Fatal ("Credentials() expected an error\n " )
@@ -169,26 +170,27 @@ func TestCredentials(t *testing.T) {
169
170
}
170
171
})
171
172
}
172
- */
173
173
174
174
func TestNoAPIKeys (t * testing.T ) {
175
175
t .Run ("no credentials" , func (t * testing.T ) {
176
176
if err := NoAPIKeys (); err != nil {
177
177
t .Fatalf ("NoAPIKeys() unexpected error %v\n " , err )
178
178
}
179
179
})
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
+
192
194
t .Run ("with auth token credentials" , func (t * testing.T ) {
193
195
// this function depends on the global config (globals are bad I know)
194
196
// the easiest way we have to test it is via ENV vars
@@ -217,18 +219,19 @@ func TestNoAccessToken(t *testing.T) {
217
219
t .Fatalf ("NoAccessToken() unexpected error %v\n " , err )
218
220
}
219
221
})
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
+ })
232
235
}
233
236
234
237
func TestFlagInSlice (t * testing.T ) {
0 commit comments