From 0e7646e930f826b737a73f72363b46076bb079c1 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Mon, 22 Jul 2024 14:08:01 -0600 Subject: [PATCH] fix: A couple small fixes to the descriptor test Signed-off-by: Terry Howe --- internal/descriptor/descriptor_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/descriptor/descriptor_test.go b/internal/descriptor/descriptor_test.go index 0cad86432..4d01e77a4 100644 --- a/internal/descriptor/descriptor_test.go +++ b/internal/descriptor/descriptor_test.go @@ -31,13 +31,13 @@ var ( } imageDesc = ocispec.Descriptor{ - MediaType: "application/vnd.oci.image.manifest.v1+json", + MediaType: ocispec.MediaTypeImageManifest, Digest: "sha256:2e0e0fe1fb3edbcdddad941c90d2b51e25a6bcd593e82545441a216de7bfa834", Size: 474, } titledDesc = ocispec.Descriptor{ - MediaType: "application/vnd.oci.image.manifest.v1+json", + MediaType: ocispec.MediaTypeImageManifest, Digest: "sha256:2e0e0fe1fb3edbcdddad941c90d2b51e25a6bcd593e82545441a216de7bfa834", Size: 474, Annotations: map[string]string{"org.opencontainers.image.title": "shaboozey"}, @@ -88,6 +88,6 @@ func TestDescriptor_GenerateContentKey(t *testing.T) { expected := "sha256:2e0e0fe1fb3edbcdddad941c90d2b51e25a6bcd593e82545441a216de7bfa834shaboozey" got := descriptor.GenerateContentKey(titledDesc) if expected != got { - t.Fatalf("GetTitleOrMediaType() got %v, want %v", got, expected) + t.Fatalf("GenerateContentKey got %v, want %v", got, expected) } }