mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
fs: Re-implement object layer to remember the fd (#3509)
This patch re-writes FS backend to support shared backend sharing locks for safe concurrent access across multiple servers.
This commit is contained in:
@@ -194,25 +194,6 @@ func TestExtractSignedHeaders(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestFindHost - tests the logic to find whether "host" is part of signed headers.
|
||||
func TestFindHost(t *testing.T) {
|
||||
// doesn't contain "host".
|
||||
signedHeaders := []string{"x-amz-content-sha256", "x-amz-date"}
|
||||
errCode := findHost(signedHeaders)
|
||||
// expected to error out with code ErrUnsignedHeaders .
|
||||
if errCode != ErrUnsignedHeaders {
|
||||
t.Fatalf("Expected the APIErrorCode to be %d, but got %d", ErrUnsignedHeaders, errCode)
|
||||
}
|
||||
|
||||
// adding "host".
|
||||
signedHeaders = append(signedHeaders, "host")
|
||||
// epxected to pass.
|
||||
errCode = findHost(signedHeaders)
|
||||
if errCode != ErrNone {
|
||||
t.Fatalf("Expected the APIErrorCode to be %d, but got %d", ErrNone, errCode)
|
||||
}
|
||||
}
|
||||
|
||||
// TestSignV4TrimAll - tests the logic of TrimAll() function
|
||||
func TestSignV4TrimAll(t *testing.T) {
|
||||
testCases := []struct {
|
||||
|
||||
Reference in New Issue
Block a user