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

Function newFakeRegistryClient

cli/command/manifest/push_test.go:16–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14)
15
16func newFakeRegistryClient() *fakeRegistryClient {
17 return &fakeRegistryClient{
18 getManifestFunc: func(_ context.Context, _ reference.Named) (manifesttypes.ImageManifest, error) {
19 return manifesttypes.ImageManifest{}, errors.New("unexpected error")
20 },
21 getManifestListFunc: func(_ context.Context, _ reference.Named) ([]manifesttypes.ImageManifest, error) {
22 return nil, errors.New("unexpected error")
23 },
24 }
25}
26
27func TestManifestPushErrors(t *testing.T) {
28 testCases := []struct {

Callers 1

TestManifestPushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…