- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for shouldPass (0.21 sec)
-
cmd/object-api-getobjectinfo_test.go
result, err := obj.GetObjectInfo(context.Background(), testCase.bucketName, testCase.objectName, opts) if err != nil && testCase.shouldPass { t.Errorf("Test %d: %s: Expected to pass, but failed with: <ERROR> %s", i+1, instanceType, err.Error()) } if err == nil && !testCase.shouldPass { t.Errorf("Test %d: %s: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, instanceType, testCase.err.Error()) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Dec 23 15:46:00 GMT 2022 - 5.6K bytes - Viewed (0) -
cmd/bucket-lifecycle-handlers_test.go
} if testCase.shouldPass && !bytes.Equal(testCase.lifecycleResponse, rec.Body.Bytes()) { t.Errorf("Test %d: %s: Expected the response to be `%s`, but instead found `%s`", i+1, instanceType, string(testCase.lifecycleResponse), rec.Body.String()) } errorResponse := APIErrorResponse{} err = xml.Unmarshal(rec.Body.Bytes(), &errorResponse) if err != nil && !testCase.shouldPass {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Jun 13 20:52:33 GMT 2023 - 11.2K bytes - Viewed (0) -
internal/bucket/encryption/bucket-sse-config_test.go
expectedErr: errors.New("MasterKeyID contains unsupported characters"), shouldPass: false, }, } for i, tc := range testCases { ssec, err := ParseBucketSSEConfig(bytes.NewReader([]byte(tc.inputXML))) if tc.shouldPass && err != nil { t.Errorf("Test case %d: Expected to succeed but got %s", i+1, err) } if !tc.shouldPass { if err == nil || err != nil && err.Error() != tc.expectedErr.Error() {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Aug 16 18:28:30 GMT 2022 - 6.1K bytes - Viewed (0) -
cmd/object-api-multipart_test.go
{bucketName: bucket, objName: object, uploadID: uploadID, PartID: 2, inputReaderData: "efgh", inputMd5: "1f7690ebdd9b4caf8fab49ca1757bf27", inputSHA256: "e5e088a0b66163a0a26a5e053d2a4496dc16ab6e0e3dd1adf2d16aa84a078c9d", inputDataSize: int64(len("efgh")), shouldPass: true},
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 77.1K bytes - Viewed (0) -
cmd/object-api-listobjects_test.go
testCase.prefix, testCase.marker, testCase.delimiter, testCase.maxKeys) } if err != nil && testCase.shouldPass { t.Errorf("Test %d: %s: Expected to pass, but failed with: <ERROR> %s", i+1, instanceType, err.Error()) } if err == nil && !testCase.shouldPass { t.Errorf("Test %d: %s: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, instanceType, testCase.err.Error()) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed May 01 11:07:40 GMT 2024 - 73.1K bytes - Viewed (0) -
internal/crypto/key_test.go
func recoverTest(i int, shouldPass bool, t *testing.T) { if err := recover(); err == nil && !shouldPass { t.Errorf("Test %d should fail but passed successfully", i) } else if err != nil && shouldPass { t.Errorf("Test %d should pass but failed: %v", i, err) } } var generateKeyTests = []struct { ExtKey [32]byte Random io.Reader ShouldPass bool }{
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Feb 02 00:13:57 GMT 2024 - 6.8K bytes - Viewed (0) -
cmd/utils_test.go
testCases := []struct { urlStr string shouldPass bool }{ {"", false}, {":", false}, {"http://localhost/", true}, {"http://127.0.0.1/", true}, {"proto://myhostname/path", true}, } // Validates fetching local address. for i, testCase := range testCases { _, err := checkURL(testCase.urlStr) if testCase.shouldPass && err != nil {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Feb 23 21:28:14 GMT 2024 - 10.2K bytes - Viewed (0) -
cmd/bucket-handlers_test.go
if !bytes.Equal(testCase.locationResponse, rec.Body.Bytes()) && testCase.shouldPass { t.Errorf("Test %d: %s: Expected the response to be `%s`, but instead found `%s`", i+1, instanceType, string(testCase.locationResponse), rec.Body.String()) } errorResponse := APIErrorResponse{} err = xml.Unmarshal(rec.Body.Bytes(), &errorResponse) if err != nil && !testCase.shouldPass {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 39.5K bytes - Viewed (2) -
cmd/object-api-putobject_test.go
if actualErr != nil && testCase.shouldPass { t.Errorf("Test %d: %s: Expected to pass, but failed with: <ERROR> %s.", i+1, instanceType, actualErr.Error()) } if actualErr == nil && !testCase.shouldPass { t.Errorf("Test %d: %s: Expected to fail with <ERROR> \"%s\", but passed instead.", i+1, instanceType, testCase.expectedError.Error()) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 25.8K bytes - Viewed (0) -
cmd/object-api-utils_test.go
} for i, testCase := range testCases { isValidBucketName := IsValidBucketName(testCase.bucketName) if testCase.shouldPass && !isValidBucketName { t.Errorf("Test case %d: Expected \"%s\" to be a valid bucket name", i+1, testCase.bucketName) } if !testCase.shouldPass && isValidBucketName { t.Errorf("Test case %d: Expected bucket name \"%s\" to be invalid", i+1, testCase.bucketName) } } }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 23.4K bytes - Viewed (0)