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

Function TestInspectCommandLocalManifest

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

Source from the content-addressed store, hash-verified

99}
100
101func TestInspectCommandLocalManifest(t *testing.T) {
102 refStore := store.NewStore(t.TempDir())
103
104 cli := test.NewFakeCli(nil)
105 cli.SetManifestStore(refStore)
106 namedRef := ref(t, "alpine:3.0")
107 imageManifest := fullImageManifest(t, namedRef)
108 err := refStore.Save(ref(t, "list:v1"), namedRef, imageManifest)
109 assert.NilError(t, err)
110
111 cmd := newInspectCommand(cli)
112 cmd.SetArgs([]string{"example.com/list:v1", "example.com/alpine:3.0"})
113 assert.NilError(t, cmd.Execute())
114 actual := cli.OutBuffer()
115 expected := golden.Get(t, "inspect-manifest.golden")
116 assert.Check(t, is.Equal(string(expected), actual.String()))
117}
118
119func TestInspectcommandRemoteManifest(t *testing.T) {
120 refStore := store.NewStore(t.TempDir())

Callers

nothing calls this directly

Calls 9

SetManifestStoreMethod · 0.95
SaveMethod · 0.95
OutBufferMethod · 0.95
fullImageManifestFunction · 0.85
SetArgsMethod · 0.80
refFunction · 0.70
newInspectCommandFunction · 0.70
GetMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…