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

Function TestManifestPush

cli/command/manifest/push_test.go:52–70  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

50}
51
52func TestManifestPush(t *testing.T) {
53 manifestStore := store.NewStore(t.TempDir())
54
55 registry := newFakeRegistryClient()
56
57 cli := test.NewFakeCli(nil)
58 cli.SetManifestStore(manifestStore)
59 cli.SetRegistryClient(registry)
60
61 namedRef := ref(t, "alpine:3.0")
62 imageManifest := fullImageManifest(t, namedRef)
63 err := manifestStore.Save(ref(t, "list:v1"), namedRef, imageManifest)
64 assert.NilError(t, err)
65
66 cmd := newPushListCommand(cli)
67 cmd.SetArgs([]string{"example.com/list:v1"})
68 err = cmd.Execute()
69 assert.NilError(t, err)
70}

Callers

nothing calls this directly

Calls 8

SetManifestStoreMethod · 0.95
SetRegistryClientMethod · 0.95
SaveMethod · 0.95
newFakeRegistryClientFunction · 0.85
fullImageManifestFunction · 0.85
newPushListCommandFunction · 0.85
SetArgsMethod · 0.80
refFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…