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

Function TestSignCommandLocalFlag

cmd/docker-trust/trust/sign_test.go:274–282  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

272}
273
274func TestSignCommandLocalFlag(t *testing.T) {
275 cli := test.NewFakeCli(&fakeClient{})
276 cli.SetNotaryClient(notaryfake.GetEmptyTargetsNotaryRepository)
277 cmd := newSignCommand(cli)
278 cmd.SetArgs([]string{"--local", "reg-name.io/image:red"})
279 cmd.SetOut(io.Discard)
280 cmd.SetErr(io.Discard)
281 assert.ErrorContains(t, cmd.Execute(), "error contacting notary server: dial tcp: lookup reg-name.io")
282}

Callers

nothing calls this directly

Calls 5

SetNotaryClientMethod · 0.95
newSignCommandFunction · 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…