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

Function TestCreateTarget

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

Source from the content-addressed store, hash-verified

226}
227
228func TestCreateTarget(t *testing.T) {
229 notaryRepo, err := client.NewFileCachedRepository(t.TempDir(), "gun", "https://localhost", nil, testPassRetriever, trustpinning.TrustPinConfig{})
230 assert.NilError(t, err)
231 _, err = createTarget(notaryRepo, "")
232 assert.Error(t, err, "no tag specified")
233 _, err = createTarget(notaryRepo, "1")
234 assert.Error(t, err, "client is offline")
235}
236
237func TestGetExistingSignatureInfoForReleasedTag(t *testing.T) {
238 notaryRepo, err := client.NewFileCachedRepository(t.TempDir(), "gun", "https://localhost", nil, testPassRetriever, trustpinning.TrustPinConfig{})

Callers

nothing calls this directly

Calls 2

createTargetFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…