Skip to content

Commit

Permalink
fix: Minor spelling error in test (#1429)
Browse files Browse the repository at this point in the history
Signed-off-by: Terry Howe <[email protected]>
  • Loading branch information
Terry Howe authored Jun 24, 2024
1 parent 13d2816 commit cca272c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/oras/root/cp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit cca272c

Please sign in to comment.