MCPcopy Create free account
hub / github.com/containers/image / TestNewReference

Function TestNewReference

storage/storage_reference_test.go:18–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16)
17
18func TestNewReference(t *testing.T) {
19 newStore(t)
20 st, ok := Transport.(*storageTransport)
21 require.True(t, ok)
22 // Success is tested throughout; test only the failure
23 _, err := newReference(*st, nil, "")
24 assert.Error(t, err)
25 _, err = newReference(*st, nil, "ab")
26 assert.Error(t, err)
27 ref, err := reference.ParseNormalizedNamed("busybox")
28 require.NoError(t, err)
29 _, err = newReference(*st, ref, "")
30 assert.Error(t, err)
31}
32
33func TestStorageReferenceTransport(t *testing.T) {
34 newStore(t)

Callers

nothing calls this directly

Calls 4

ParseNormalizedNamedFunction · 0.92
newStoreFunction · 0.85
newReferenceFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…