MCPcopy Create free account
hub / github.com/docker/cli / TestEmptyConfigDir

Function TestEmptyConfigDir

cli/config/config_test.go:30–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

28}
29
30func TestEmptyConfigDir(t *testing.T) {
31 tmpHome := setupConfigDir(t)
32
33 config, err := Load("")
34 assert.NilError(t, err)
35
36 expectedConfigFilename := filepath.Join(tmpHome, ConfigFileName)
37 assert.Check(t, is.Equal(expectedConfigFilename, config.Filename))
38
39 // Now save it and make sure it shows up in new form
40 saveConfigAndValidateNewFormat(t, config, tmpHome)
41}
42
43func TestMissingFile(t *testing.T) {
44 tmpHome := t.TempDir()

Callers

nothing calls this directly

Calls 3

setupConfigDirFunction · 0.85
LoadFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…