diff --git a/cmd/oras/root/push.go b/cmd/oras/root/push.go index f053cec38..323468d39 100644 --- a/cmd/oras/root/push.go +++ b/cmd/oras/root/push.go @@ -197,7 +197,7 @@ func runPush(cmd *cobra.Command, opts *pushOptions) error { if err != nil { return err } - mediaType := oras.MediaTypeUnknownConfig + mediaType := ocispec.MediaTypeImageConfig if opts.Flag == option.ImageSpecV1_0 && opts.artifactType != "" { mediaType = opts.artifactType } diff --git a/test/e2e/internal/testdata/foobar/const.go b/test/e2e/internal/testdata/foobar/const.go index e4b39cfb2..70af1eb3d 100644 --- a/test/e2e/internal/testdata/foobar/const.go +++ b/test/e2e/internal/testdata/foobar/const.go @@ -41,7 +41,7 @@ var ( PlatformConfigSize = 38 PlatformConfigDigest = digest.Digest("sha256:e94c0ba80a1157ffab5b5c6656fffc089c6446c7ed0604f3382910d1ef7dd40d") PlatformConfigStateKey = match.StateKey{ - Digest: "e94c0ba80a11", Name: "application/vnd.unknown.config.v1+json", + Digest: "e94c0ba80a11", Name: "application/vnd.oci.image.config.v1+json", } PlatformV10ConfigSize = 38 @@ -50,7 +50,7 @@ var ( Digest: "e94c0ba80a11", Name: "test/artifact+json", } PlatformV1DEfaultConfigStateKey = match.StateKey{ - Digest: "e94c0ba80a11", Name: "application/vnd.unknown.config.v1+json", + Digest: "e94c0ba80a11", Name: "application/vnd.oci.image.config.v1+json", } FileBarName = "foobar/bar" diff --git a/test/e2e/suite/command/push.go b/test/e2e/suite/command/push.go index cfba901bc..7dba0b3a2 100644 --- a/test/e2e/suite/command/push.go +++ b/test/e2e/suite/command/push.go @@ -674,7 +674,7 @@ var _ = Describe("OCI image layout users:", func() { var manifest ocispec.Manifest Expect(json.Unmarshal(fetched, &manifest)).ShouldNot(HaveOccurred()) Expect(manifest.Config).Should(Equal(ocispec.Descriptor{ - MediaType: "application/vnd.unknown.config.v1+json", + MediaType: "application/vnd.oci.image.config.v1+json", Size: int64(foobar.PlatformV10ConfigSize), Digest: foobar.PlatformV10ConfigDigest, }))