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

Function TestRunCopyToContainerSourceDoesNotExist

cli/command/container/cp_test.go:139–150  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

137}
138
139func TestRunCopyToContainerSourceDoesNotExist(t *testing.T) {
140 cli := test.NewFakeCli(&fakeClient{})
141 err := runCopy(context.TODO(), cli, copyOptions{
142 source: "/does/not/exist",
143 destination: "container:/path",
144 })
145 expected := "no such file or directory"
146 if runtime.GOOS == "windows" {
147 expected = "cannot find the file specified"
148 }
149 assert.ErrorContains(t, err, expected)
150}
151
152func TestSplitCpArg(t *testing.T) {
153 testcases := []struct {

Callers

nothing calls this directly

Calls 1

runCopyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…