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

Function TestConfigDir

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

Source from the content-addressed store, hash-verified

292}
293
294func TestConfigDir(t *testing.T) {
295 tmpHome := t.TempDir()
296
297 if Dir() == tmpHome {
298 t.Fatalf("Expected ConfigDir to be different than %s by default, but was the same", tmpHome)
299 }
300
301 // Update configDir
302 SetDir(tmpHome)
303
304 if Dir() != tmpHome {
305 t.Fatalf("Expected ConfigDir to %s, but was %s", tmpHome, Dir())
306 }
307}
308
309func TestJSONReaderNoFile(t *testing.T) {
310 js := ` { "auths": { "https://index.docker.io/v1/": { "auth": "am9lam9lOmhlbGxv", "email": "user@example.com" } } }`

Callers

nothing calls this directly

Calls 2

DirFunction · 0.85
SetDirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…