Merge pull request #3904 from yeahdongcn/manifest
Replace ocispec.MediaTypeImageManifest with manifest.MediaType
This commit is contained in:
commit
f823c37708
@ -181,7 +181,7 @@ func ImportIndex(ctx context.Context, store content.Store, reader io.Reader, opt
|
||||
Layers: layers,
|
||||
}
|
||||
|
||||
desc, err := writeManifest(ctx, store, manifest, ocispec.MediaTypeImageManifest)
|
||||
desc, err := writeManifest(ctx, store, manifest, manifest.MediaType)
|
||||
if err != nil {
|
||||
return ocispec.Descriptor{}, errors.Wrap(err, "write docker manifest")
|
||||
}
|
||||
|
@ -278,11 +278,11 @@ func checkImages(t *testing.T, target digest.Digest, actual []images.Image, name
|
||||
t.Fatalf("image(%d) unexpected name %q, expected %q", i, actual[i].Name, n)
|
||||
}
|
||||
|
||||
if actual[i].Target.MediaType != ocispec.MediaTypeImageManifest {
|
||||
if actual[i].Target.MediaType != ocispec.MediaTypeImageManifest &&
|
||||
actual[i].Target.MediaType != images.MediaTypeDockerSchema2Manifest {
|
||||
t.Fatalf("image(%d) unexpected media type: %s", i, actual[i].Target.MediaType)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func createContent(size int64, seed int64) ([]byte, digest.Digest) {
|
||||
|
Loading…
Reference in New Issue
Block a user