MCPcopy Index your code
hub / github.com/docker/cli / TestExportExistingFile

Function TestExportExistingFile

cli/command/context/export-import_test.go:80–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

78}
79
80func TestExportExistingFile(t *testing.T) {
81 contextFile := filepath.Join(t.TempDir(), "exported")
82 cli := makeFakeCli(t)
83 cli.ErrBuffer().Reset()
84 assert.NilError(t, os.WriteFile(contextFile, []byte{}, 0o644))
85 err := runExport(cli, "test", contextFile)
86 assert.Assert(t, os.IsExist(err))
87}

Callers

nothing calls this directly

Calls 3

makeFakeCliFunction · 0.85
runExportFunction · 0.70
ErrBufferMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…