(t *testing.T)
| 206 | } |
| 207 | |
| 208 | func TestReferenceNewImage(t *testing.T) { |
| 209 | sysCtx := &types.SystemContext{ |
| 210 | RegistriesDirPath: "/this/does/not/exist", |
| 211 | DockerPerHostCertDirPath: "/this/does/not/exist", |
| 212 | ArchitectureChoice: "amd64", |
| 213 | OSChoice: "linux", |
| 214 | } |
| 215 | ref, err := ParseReference("//quay.io/libpod/busybox") |
| 216 | require.NoError(t, err) |
| 217 | img, err := ref.NewImage(context.Background(), sysCtx) |
| 218 | require.NoError(t, err) |
| 219 | defer img.Close() |
| 220 | |
| 221 | // unknownDigest case should return error |
| 222 | ref, err = ParseReference("//quay.io/libpod/busybox" + unknownDigestSuffixTest) |
| 223 | require.NoError(t, err) |
| 224 | _, err = ref.NewImage(context.Background(), sysCtx) |
| 225 | assert.Error(t, err) |
| 226 | } |
| 227 | |
| 228 | func TestReferenceNewImageSource(t *testing.T) { |
| 229 | sysCtx := &types.SystemContext{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…