Skip to content

Commit

Permalink
add a non-TLS test (#2005)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored Oct 9, 2024
1 parent 9933690 commit cca4103
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ functional-test:
@GO111MODULE=on go build -race functional_tests.go
@SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 MINT_MODE=full ./functional_tests

functional-test-notls:
@GO111MODULE=on go build -race functional_tests.go
@SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=0 MINT_MODE=full ./functional_tests

clean:
@echo "Cleaning up all the generated files"
@find . -name '*.test' | xargs rm -fv
Expand Down
14 changes: 4 additions & 10 deletions functional_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -3565,16 +3565,10 @@ func validateObjectAttributeRequest(OA *minio.ObjectAttributes, opts *minio.Obje
}
}

hasFullObjectChecksum := true
if OA.Checksum.ChecksumCRC32 == "" {
if OA.Checksum.ChecksumCRC32C == "" {
if OA.Checksum.ChecksumSHA1 == "" {
if OA.Checksum.ChecksumSHA256 == "" {
hasFullObjectChecksum = false
}
}
}
}
hasFullObjectChecksum := (OA.Checksum.ChecksumCRC32 != "" ||
OA.Checksum.ChecksumCRC32C != "" ||
OA.Checksum.ChecksumSHA1 != "" ||
OA.Checksum.ChecksumSHA256 != "")

if test.HasFullChecksum {
if !hasFullObjectChecksum {
Expand Down

0 comments on commit cca4103

Please sign in to comment.