1
0
mirror of https://github.com/docker/cli.git synced 2026-11-01 23:35:23 +03:00

Merge pull request #6772 from thaJeztah/cleanup_testfile

cli/command: TestGetDefaultAuthConfig: cleanup test file
This commit is contained in:
Paweł Gronowski
2026-02-02 16:33:58 +00:00
committed by GitHub

View File

@@ -3,6 +3,7 @@ package command_test
import (
"bytes"
"path"
"path/filepath"
"testing"
"github.com/docker/cli/cli/command"
@@ -58,7 +59,9 @@ func TestGetDefaultAuthConfig(t *testing.T) {
expectedAuthConfig: testAuthConfigs[1],
},
}
cfg := configfile.New("filename")
tmpDir := t.TempDir()
cfg := configfile.New(filepath.Join(tmpDir, "cli-config.json"))
for _, authConfig := range testAuthConfigs {
assert.Check(t, cfg.GetCredentialsStore(authConfig.ServerAddress).Store(configtypes.AuthConfig{
Username: authConfig.Username,