Skip to content

Commit

Permalink
fix: platform config type (oras-project#1518)
Browse files Browse the repository at this point in the history
Signed-off-by: Terry Howe <[email protected]>
  • Loading branch information
TerryHowe authored Oct 29, 2024
1 parent 97cb376 commit 270aa65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/oras/root/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/internal/testdata/foobar/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/suite/command/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}))
Expand Down

0 comments on commit 270aa65

Please sign in to comment.