From 34bdc25f0f25d50becaa816b7f82dacb3c94a94e Mon Sep 17 00:00:00 2001 From: arewm Date: Mon, 16 Dec 2024 10:17:13 -0500 Subject: [PATCH] associate appropriate mediaTypes Signed-off-by: arewm --- internal/rego/oci/__snapshots__/oci_test.snap | 6 +++--- internal/rego/oci/oci_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/rego/oci/__snapshots__/oci_test.snap b/internal/rego/oci/__snapshots__/oci_test.snap index 59994275e..91c7baa0e 100755 --- a/internal/rego/oci/__snapshots__/oci_test.snap +++ b/internal/rego/oci/__snapshots__/oci_test.snap @@ -940,7 +940,7 @@ }, { "type": "string", - "value": "application/vnd.oci.image.config.v1+json" + "value": "application/vnd.oci.image.manifest.v1+json" } ], [ @@ -1116,7 +1116,7 @@ }, { "type": "string", - "value": "application/vnd.oci.image.config.v1+json" + "value": "application/vnd.oci.image.manifest.v1+json" } ], [ @@ -1194,7 +1194,7 @@ }, { "type": "string", - "value": "application/vnd.oci.image.config.v1+json" + "value": "application/vnd.oci.image.index.v1+json" } ], [ diff --git a/internal/rego/oci/oci_test.go b/internal/rego/oci/oci_test.go index e178768f4..a4a561a69 100644 --- a/internal/rego/oci/oci_test.go +++ b/internal/rego/oci/oci_test.go @@ -121,7 +121,7 @@ func TestOCIDescriptorManifest(t *testing.T) { name: "complete image manifest", ref: ast.StringTerm("registry.local/spam:latest@sha256:01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"), descriptor: &v1.Descriptor{ - MediaType: types.OCIConfigJSON, + MediaType: types.OCIManifestSchema1, Size: 123, Digest: v1.Hash{ Algorithm: "sha256", @@ -148,7 +148,7 @@ func TestOCIDescriptorManifest(t *testing.T) { name: "minimal image manifest", ref: ast.StringTerm("registry.local/spam:latest@sha256:01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"), descriptor: &v1.Descriptor{ - MediaType: types.OCIConfigJSON, + MediaType: types.OCIManifestSchema1, Size: 123, Digest: v1.Hash{ Algorithm: "sha256", @@ -160,7 +160,7 @@ func TestOCIDescriptorManifest(t *testing.T) { name: "minimal image index", ref: ast.StringTerm("registry.local/spam:latest@sha256:01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"), descriptor: &v1.Descriptor{ - MediaType: types.OCIConfigJSON, + MediaType: types.OCIImageIndex, Size: 123, Digest: v1.Hash{ Algorithm: "sha256",