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

Function TestNewLoadCommandInvalidInput

cli/command/image/load_test.go:65–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

63}
64
65func TestNewLoadCommandInvalidInput(t *testing.T) {
66 expectedError := "open *"
67 cmd := newLoadCommand(test.NewFakeCli(&fakeClient{}))
68 cmd.SetOut(io.Discard)
69 cmd.SetErr(io.Discard)
70 cmd.SetArgs([]string{"--input", "*"})
71 err := cmd.Execute()
72 assert.ErrorContains(t, err, expectedError)
73}
74
75func mockImageLoadResult(content string) client.ImageLoadResult {
76 return io.NopCloser(strings.NewReader(content))

Callers

nothing calls this directly

Calls 4

newLoadCommandFunction · 0.85
SetArgsMethod · 0.80
SetOutMethod · 0.45
SetErrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…