// compare the HTTP response status code with the expected one.
ifrec.Code!=expectedHTTPStatus{
failTest(anonTestStr,fmt.Sprintf("Expected the anonymous HTTP request to be served after the policy changes\n,Expected response HTTP status code to be %d, got %d",
expectedHTTPStatus,rec.Code))
t.Fatal(failTestStr(anonTestStr,fmt.Sprintf("Expected the anonymous HTTP request to be served after the policy changes\n,Expected response HTTP status code to be %d, got %d",
failTest(unknownSignTestStr,"error response content differs from expected value")
t.Fatal(failTestStr(unknownSignTestStr,"error response content differs from expected value"))
}
}
ifrec.Code!=accesDeniedHTTPStatus{
failTest(unknownSignTestStr,fmt.Sprintf("Object API Unknow auth test for \"%s\", expected to fail with %d, but failed with %d",testName,accesDeniedHTTPStatus,rec.Code))
t.Fatal(failTestStr(unknownSignTestStr,fmt.Sprintf("Object API Unknow auth test for \"%s\", expected to fail with %d, but failed with %d",testName,accesDeniedHTTPStatus,rec.Code)))
}
}
// ExecObjectLayerAPINilTest - Sets the object layer to `nil`, and calls rhe registered object layer API endpoint, and assert the error response.