From 1bb1cfbc31436e159abde343134eb09b7c04ec36 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 9 Oct 2024 12:20:22 -0700 Subject: [PATCH] add a non-TLS test --- Makefile | 4 ++++ functional_tests.go | 14 ++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 68444aa681..9e4ddc4c88 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/functional_tests.go b/functional_tests.go index 780dc89979..c0180b36b7 100644 --- a/functional_tests.go +++ b/functional_tests.go @@ -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 {