- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 48 for expectedErr (1.75 sec)
-
cmd/xl-storage_test.go
testCases := []struct { volName string expectedErr error }{ // TestXLStorage case - 1. { volName: "success-vol", expectedErr: nil, }, // TestXLStorage case - 2. { volName: "nonexistent-vol", expectedErr: errVolumeNotFound, }, // TestXLStorage case - 3. { volName: "ab", expectedErr: errVolumeNotFound, }, }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 66.7K bytes - Viewed (0) -
cmd/server-main_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Dec 07 09:33:56 UTC 2023 - 3.1K bytes - Viewed (0) -
internal/crypto/header_test.go
var s3ParseTests = []struct { Header http.Header ExpectedErr error }{ {Header: http.Header{"X-Amz-Server-Side-Encryption": []string{"AES256"}}, ExpectedErr: nil}, // 0 {Header: http.Header{"X-Amz-Server-Side-Encryption": []string{"AES-256"}}, ExpectedErr: ErrInvalidEncryptionMethod}, // 1 {Header: http.Header{"X-Amz-Server-Side-Encryption": []string{""}}, ExpectedErr: ErrInvalidEncryptionMethod}, // 2
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 13 14:52:15 UTC 2022 - 21.4K bytes - Viewed (0) -
cmd/erasure-metadata_test.go
} // Test them. for _, testCase := range testCases { index, offset, err := fi.ObjectToPartOffset(context.Background(), testCase.offset) if err != testCase.expectedErr { t.Fatalf("%+v: expected = %s, got: %s", testCase, testCase.expectedErr, err) } if index != testCase.expectedIndex { t.Fatalf("%+v: index: expected = %d, got: %d", testCase, testCase.expectedIndex, index) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jul 25 21:02:50 UTC 2024 - 13.5K bytes - Viewed (0) -
cmd/jwt_test.go
} testCases := []struct { req *http.Request expectedErr error }{ // Set valid authorization header. { req: &http.Request{ Header: http.Header{ "Authorization": []string{token}, }, }, expectedErr: nil, }, // No authorization header. { req: &http.Request{ Header: http.Header{}, }, expectedErr: errNoAuthToken, }, // Invalid authorization token.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 4.4K bytes - Viewed (0) -
internal/amztime/parse_test.go
for _, testCase := range testCases { testCase := testCase t.Run(testCase.timeStr, func(t *testing.T) { gott, goterr := Parse(testCase.timeStr) if !errors.Is(goterr, testCase.expectedErr) { t.Errorf("expected %v, got %v", testCase.expectedErr, goterr) } if !gott.Equal(testCase.expectedTime) { t.Errorf("expected %v, got %v", testCase.expectedTime, gott) } }) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 07 14:24:54 UTC 2022 - 1.6K bytes - Viewed (0) -
cmd/endpoint_test.go
err = endpoint.UpdateIsLocal() } switch { case test.expectedErr == nil: if err != nil { t.Errorf("error: expected = <nil>, got = %v", err) } case err == nil: t.Errorf("error: expected = %v, got = <nil>", test.expectedErr) case test.expectedErr.Error() != err.Error(): t.Errorf("error: expected = %v, got = %v", test.expectedErr, err) } if err == nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jan 13 07:53:03 UTC 2024 - 18.9K bytes - Viewed (0) -
internal/bucket/lifecycle/rule_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 01:11:10 UTC 2024 - 4.9K bytes - Viewed (0) -
internal/crypto/metadata_test.go
if err != nil && test.ExpectedErr == nil { t.Errorf("Test %d: got error '%v' - want error '%v'", i, err, test.ExpectedErr) } if err == nil && test.ExpectedErr != nil { t.Errorf("Test %d: got error '%v' - want error '%v'", i, err, test.ExpectedErr) } if err != nil && test.ExpectedErr != nil { if err.Error() != test.ExpectedErr.Error() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 18.7K bytes - Viewed (0) -
internal/crypto/sse_test.go
}, ExpectedErr: ErrMissingCustomerKeyMD5, }, } func TestSSECUnsealObjectKey(t *testing.T) { for i, test := range ssecUnsealObjectKeyTests { if _, err := SSEC.UnsealObjectKey(test.Headers, test.Metadata, test.Bucket, test.Object); err != test.ExpectedErr { t.Errorf("Test %d: got: %v - want: %v", i, err, test.ExpectedErr) } } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 8.4K bytes - Viewed (0)