Condensing Successful responses (#2722)

This commit is contained in:
Cesar Celis Hernandez
2023-03-17 17:12:59 -06:00
committed by GitHub
parent 07b7af59b6
commit f20fa0b1c8

View File

@@ -167,6 +167,10 @@ func setupBucketForEndpoint(name string, locking, versioning bool, quota, retent
return false
}
if response != nil {
if response.StatusCode >= 200 && response.StatusCode <= 299 {
fmt.Println("setupBucketForEndpoint(): HTTP Status is in the 2xx range")
return true
}
if response.StatusCode != expected {
assert.Fail(inspectHTTPResponse(response))
return false