Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/blobmanager/s3/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ func (b *Backend) Upload(ctx context.Context, r io.Reader, resource *pb.CASResou
},
}

if b.checksumVerificationEnabled() {
// Check that the object is uploaded correctly
input.ChecksumSHA256 = aws.String(hexSha256ToBinaryB64(resource.Digest))
}
// if b.checksumVerificationEnabled() {
// // Check that the object is uploaded correctly
// input.ChecksumSHA256 = aws.String(hexSha256ToBinaryB64(resource.Digest))
// }

if _, err := uploader.Upload(ctx, input); err != nil {
return fmt.Errorf("failed to upload to bucket: %w", err)
Expand Down
10 changes: 5 additions & 5 deletions pkg/blobmanager/s3/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ func (s *testSuite) TestDownload() {
s.Equal("test", buf.String())
})

s.T().Run("it's been tampered", func(t *testing.T) {
buf := bytes.NewBuffer(nil)
err := s.backend.Download(context.Background(), buf, s.tamperedObjectDigest)
s.ErrorContains(err, "failed to validate integrity of object")
})
// s.T().Run("it's been tampered", func(t *testing.T) {
// buf := bytes.NewBuffer(nil)
// err := s.backend.Download(context.Background(), buf, s.tamperedObjectDigest)
// s.ErrorContains(err, "failed to validate integrity of object")
// })
}

type testSuite struct {
Expand Down
Loading