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

Function TestInspectCommandLocalManifestNotFound

cli/command/manifest/inspect_test.go:65–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

63}
64
65func TestInspectCommandLocalManifestNotFound(t *testing.T) {
66 refStore := store.NewStore(t.TempDir())
67
68 cli := test.NewFakeCli(nil)
69 cli.SetManifestStore(refStore)
70
71 cmd := newInspectCommand(cli)
72 cmd.SetOut(io.Discard)
73 cmd.SetErr(io.Discard)
74 cmd.SetArgs([]string{"example.com/list:v1", "example.com/alpine:3.0"})
75 err := cmd.Execute()
76 assert.Error(t, err, "No such manifest: example.com/alpine:3.0")
77}
78
79func TestInspectCommandNotFound(t *testing.T) {
80 refStore := store.NewStore(t.TempDir())

Callers

nothing calls this directly

Calls 6

SetManifestStoreMethod · 0.95
SetArgsMethod · 0.80
newInspectCommandFunction · 0.70
SetOutMethod · 0.45
SetErrMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…