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

Function TestStorageReferenceDockerReference

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

Source from the content-addressed store, hash-verified

84}
85
86func TestStorageReferenceDockerReference(t *testing.T) {
87 newStore(t)
88 for _, c := range validReferenceTestCases {
89 ref, err := Transport.ParseReference(c.input)
90 require.NoError(t, err, c.input)
91 if c.dockerRef != "" {
92 dr := ref.DockerReference()
93 require.NotNil(t, dr, c.input)
94 assert.Equal(t, c.dockerRef, dr.String(), c.input)
95 } else {
96 dr := ref.DockerReference()
97 assert.Nil(t, dr, c.input)
98 }
99 }
100}
101
102// The […] part of references created for store
103func storeSpecForStringWithinTransport(store storage.Store) string {

Callers

nothing calls this directly

Calls 4

newStoreFunction · 0.85
ParseReferenceMethod · 0.65
DockerReferenceMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…