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

Function TestRemoveMultipleSigners

cmd/docker-trust/trust/signer_remove_test.go:95–104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestRemoveMultipleSigners(t *testing.T) {
96 cli := test.NewFakeCli(&fakeClient{})
97 cli.SetNotaryClient(notaryfake.GetLoadedNotaryRepository)
98 ctx := context.Background()
99 err := removeSigner(ctx, cli, signerRemoveOptions{signer: "test", repos: []string{"signed-repo", "signed-repo"}, forceYes: true})
100 assert.Error(t, err, "error removing signer from: signed-repo, signed-repo")
101 assert.Check(t, is.Contains(cli.ErrBuffer().String(),
102 "no signer test for repository signed-repo"))
103 assert.Check(t, is.Contains(cli.OutBuffer().String(), "Removing signer \"test\" from signed-repo...\n"))
104}
105
106func TestRemoveLastSignerWarning(t *testing.T) {
107 cli := test.NewFakeCli(&fakeClient{})

Callers

nothing calls this directly

Calls 7

SetNotaryClientMethod · 0.95
ErrBufferMethod · 0.95
OutBufferMethod · 0.95
removeSignerFunction · 0.85
ContainsMethod · 0.80
StringMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…