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

Function TestReferenceStringWithinTransport

docker/docker_transport_test.go:153–165  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

151}
152
153func TestReferenceStringWithinTransport(t *testing.T) {
154 for _, c := range validReferenceTestCases {
155 ref, err := ParseReference("//" + c.input)
156 require.NoError(t, err, c.input)
157 stringRef := ref.StringWithinTransport()
158 assert.Equal(t, c.stringWithinTransport, stringRef, c.input)
159 // Do one more round to verify that the output can be parsed, to an equal value.
160 ref2, err := Transport.ParseReference(stringRef)
161 require.NoError(t, err, c.input)
162 stringRef2 := ref2.StringWithinTransport()
163 assert.Equal(t, stringRef, stringRef2, c.input)
164 }
165}
166
167func TestReferenceDockerReference(t *testing.T) {
168 for _, c := range validReferenceTestCases {

Callers

nothing calls this directly

Calls 3

ParseReferenceFunction · 0.70
StringWithinTransportMethod · 0.65
ParseReferenceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…