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

Function TestSetDir

cli/config/config_test.go:479–484  ·  view source on GitHub ↗

TestSetDir verifies that Dir() does not overwrite the value set through SetDir() if it has not been run before.

(t *testing.T)

Source from the content-addressed store, hash-verified

477// TestSetDir verifies that Dir() does not overwrite the value set through
478// SetDir() if it has not been run before.
479func TestSetDir(t *testing.T) {
480 const expected = "my_config_dir"
481 resetConfigDir()
482 SetDir(expected)
483 assert.Check(t, is.Equal(Dir(), expected))
484}

Callers

nothing calls this directly

Calls 3

resetConfigDirFunction · 0.85
SetDirFunction · 0.85
DirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…