Skip to content

Commit a5c7197

Browse files
authored
Merge pull request #6772 from thaJeztah/cleanup_testfile
cli/command: TestGetDefaultAuthConfig: cleanup test file
2 parents 435384f + f35fb0f commit a5c7197

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cli/command/registry_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package command_test
33
import (
44
"bytes"
55
"path"
6+
"path/filepath"
67
"testing"
78

89
"github.com/docker/cli/cli/command"
@@ -58,7 +59,9 @@ func TestGetDefaultAuthConfig(t *testing.T) {
5859
expectedAuthConfig: testAuthConfigs[1],
5960
},
6061
}
61-
cfg := configfile.New("filename")
62+
63+
tmpDir := t.TempDir()
64+
cfg := configfile.New(filepath.Join(tmpDir, "cli-config.json"))
6265
for _, authConfig := range testAuthConfigs {
6366
assert.Check(t, cfg.GetCredentialsStore(authConfig.ServerAddress).Store(configtypes.AuthConfig{
6467
Username: authConfig.Username,

0 commit comments

Comments
 (0)