From 216f2d913cbc5e78b239b33932215926ddd04753 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Sun, 23 Jun 2024 13:54:53 -0600 Subject: [PATCH] fix: Minor spelling error in test Signed-off-by: Terry Howe --- cmd/oras/root/cp_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/oras/root/cp_test.go b/cmd/oras/root/cp_test.go index 1adb5b339..099539913 100644 --- a/cmd/oras/root/cp_test.go +++ b/cmd/oras/root/cp_test.go @@ -39,7 +39,7 @@ import ( var ( memStore *memory.Store memDesc ocispec.Descriptor - manifestConent = []byte(`{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","artifactType":"application/vnd.unknown.artifact.v1","config":{"mediaType":"application/vnd.oci.empty.v1+json","digest":"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a","size":2,"data":"e30="},"layers":[{"mediaType":"application/vnd.oci.empty.v1+json","digest":"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a","size":2,"data":"e30="}]}`) + manifestContent = []byte(`{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","artifactType":"application/vnd.unknown.artifact.v1","config":{"mediaType":"application/vnd.oci.empty.v1+json","digest":"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a","size":2,"data":"e30="},"layers":[{"mediaType":"application/vnd.oci.empty.v1+json","digest":"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a","size":2,"data":"e30="}]}`) manifestDigest = "sha256:1bb053792feb8d8d590001c212f2defad9277e091d2aa868cde2879ff41abb1b" configContent = []byte("{}") configDigest = "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" @@ -74,13 +74,13 @@ func TestMain(m *testing.M) { case r.URL.Path == fmt.Sprintf("/v2/%s/manifests/%s", repoFrom, manifestDigest) && r.Method == http.MethodHead: w.Header().Set("Content-Type", ocispec.MediaTypeImageManifest) - w.Header().Set("Content-Length", fmt.Sprint(len(manifestConent))) + w.Header().Set("Content-Length", fmt.Sprint(len(manifestContent))) w.WriteHeader(http.StatusOK) case r.URL.Path == fmt.Sprintf("/v2/%s/manifests/%s", repoFrom, manifestDigest) && r.Method == http.MethodGet: w.Header().Set("Content-Type", ocispec.MediaTypeImageManifest) - w.Header().Set("Content-Length", fmt.Sprint(len(manifestConent))) - _, _ = w.Write(manifestConent) + w.Header().Set("Content-Length", fmt.Sprint(len(manifestContent))) + _, _ = w.Write(manifestContent) w.WriteHeader(http.StatusOK) case r.URL.Path == fmt.Sprintf("/v2/%s/blobs/%s", repoFrom, configDigest) && r.Method == http.MethodGet: @@ -106,8 +106,8 @@ func TestMain(m *testing.M) { case r.URL.Path == fmt.Sprintf("/v2/%s/manifests/%s", repoTo, manifestDigest) && r.Method == http.MethodGet: w.Header().Set("Content-Type", ocispec.MediaTypeImageManifest) - w.Header().Set("Content-Length", fmt.Sprint(len(manifestConent))) - _, _ = w.Write(manifestConent) + w.Header().Set("Content-Length", fmt.Sprint(len(manifestContent))) + _, _ = w.Write(manifestContent) w.WriteHeader(http.StatusOK) default: w.WriteHeader(http.StatusNotAcceptable)