There was an error while loading. Please reload this page.
1 parent f58c11f commit 4a5226bCopy full SHA for 4a5226b
1 file changed
utils/coreutils/utils_test.go
@@ -281,7 +281,10 @@ func TestGetMaskedCommandString(t *testing.T) {
281
}
282
283
func TestGetJfrogCertsDirFromEnv(t *testing.T) {
284
- t.Setenv("JFROG_CLI_CERTS_DIR", "/custom/certs")
+ t.Setenv(CertsDir, "/custom/certs")
285
+ defer func() {
286
+ assert.NoError(t, os.Unsetenv(CertsDir))
287
+ }()
288
289
certsDir, err := GetJfrogCertsDir()
290
@@ -290,7 +293,10 @@ func TestGetJfrogCertsDirFromEnv(t *testing.T) {
293
291
294
292
295
func TestGetJfrogCertsDirFallsBackToHomeDir(t *testing.T) {
- t.Setenv("JFROG_CLI_HOME_DIR", "/tmp/jfrog")
296
+ t.Setenv(HomeDir, "/tmp/jfrog")
297
298
+ assert.NoError(t, os.Unsetenv(HomeDir))
299
300
301
302
0 commit comments