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

Function TestReferenceNewImageDestination

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

Source from the content-addressed store, hash-verified

244}
245
246func TestReferenceNewImageDestination(t *testing.T) {
247 ref, err := ParseReference("//quay.io/libpod/busybox")
248 require.NoError(t, err)
249 dest, err := ref.NewImageDestination(context.Background(),
250 &types.SystemContext{RegistriesDirPath: "/this/does/not/exist", DockerPerHostCertDirPath: "/this/does/not/exist"})
251 require.NoError(t, err)
252 defer dest.Close()
253
254 ref, err = ParseReference("//quay.io/libpod/busybox" + unknownDigestSuffixTest)
255 require.NoError(t, err)
256 dest2, err := ref.NewImageDestination(context.Background(),
257 &types.SystemContext{RegistriesDirPath: "/this/does/not/exist", DockerPerHostCertDirPath: "/this/does/not/exist"})
258 require.NoError(t, err)
259 defer dest2.Close()
260}
261
262func TestReferenceTagOrDigest(t *testing.T) {
263 for input, expected := range map[string]string{

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.95
ParseReferenceFunction · 0.70
NewImageDestinationMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…