Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr committed Apr 25, 2023
1 parent 860cfab commit a65ff5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pkg/v1/remote/descriptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func TestGetImageAsIndex(t *testing.T) {
func TestHeadSchema1(t *testing.T) {
expectedRepo := "foo/bar"
mediaType := types.DockerManifestSchema1Signed
fakeDigest := "sha256:0000000000000000000000000000000000000000000000000000000000000000"
response := []byte("doesn't matter")
manifestPath := fmt.Sprintf("/v2/%s/manifests/latest", expectedRepo)

Expand Down Expand Up @@ -203,7 +202,7 @@ func TestHead_MissingHeaders(t *testing.T) {
w.Header().Set("Content-Length", "10")
}
if !strings.Contains(r.URL.Path, missingDigest) {
w.Header().Set("Docker-Content-Digest", "sha256:0000000000000000000000000000000000000000000000000000000000000000")
w.Header().Set("Docker-Content-Digest", fakeDigest)
}
}))
defer server.Close()
Expand Down Expand Up @@ -231,7 +230,7 @@ func TestRedactFetchBlob(t *testing.T) {
Transport: errTransport{},
},
}
h, err := v1.NewHash("sha256:0000000000000000000000000000000000000000000000000000000000000000")
h, err := v1.NewHash(fakeDigest)
if err != nil {
t.Fatal("NewHash:", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/v1/remote/puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (p *Puller) get(ctx context.Context, ref name.Reference, acceptable []types
return f.get(ctx, ref, acceptable, platform)
}

// Layer is like remote.Layer, but avoids re-authenticated when possible.
// Layer is like remote.Layer, but avoids re-authenticating when possible.
func (p *Puller) Layer(ctx context.Context, ref name.Digest) (v1.Layer, error) {
f, err := p.fetcher(ctx, ref.Context())
if err != nil {
Expand Down

0 comments on commit a65ff5f

Please sign in to comment.