- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for expectedErr (0.44 sec)
-
cmd/update_test.go
} } str := getUserAgent(testCase.mode) expectedStr := testCase.expectedStr if IsDocker() { expectedStr = strings.ReplaceAll(expectedStr, "; source", "; docker; source") } if !strings.Contains(str, expectedStr) { t.Errorf("Test %d: expected: %s, got: %s", i+1, expectedStr, str) } os.Unsetenv("MARATHON_APP_LABEL_DCOS_PACKAGE_VERSION") os.Unsetenv(testCase.envName)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 10.4K bytes - Viewed (0) -
internal/bucket/object/lock/lock_test.go
tests := []struct { value DefaultRetention expectedErr error expectErr bool }{ { value: DefaultRetention{Mode: "retain"}, expectedErr: fmt.Errorf("unknown retention mode retain"), expectErr: true, }, { value: DefaultRetention{Mode: RetGovernance}, expectedErr: fmt.Errorf("either Days or Years must be specified"), expectErr: true, }, {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 29 01:20:27 UTC 2024 - 17.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/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/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/config/certs_test.go
certFile string expectedResultLen int expectedErr bool }{ {"nonexistent-file", 0, true}, {tempFile1, 0, true}, {tempFile2, 0, true}, {tempFile3, 0, true}, {tempFile4, 1, false}, {tempFile5, 2, false}, } for _, testCase := range testCases { certs, err := ParsePublicCertFile(testCase.certFile) if !testCase.expectedErr && err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 21.6K bytes - Viewed (0) -
cmd/object_api_suite_test.go
}, } for i, testCase := range testCases { _, expectedErr := obj.GetObjectInfo(context.Background(), bucketName, testCase.dir, opts) if expectedErr != nil && expectedErr.Error() != testCase.err.Error() { t.Errorf("Test %d, %s: Expected error %s, got %s", i+1, instanceType, testCase.err, expectedErr) } } } // Wrapper for calling testContentType for both Erasure and FS.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 02 15:13:05 UTC 2024 - 33.3K bytes - Viewed (0) -
cmd/erasure-object_test.go
} _, actualErr := xl.DeleteObject(ctx, test.bucket, test.object, ObjectOptions{}) if test.expectedErr != nil && actualErr != test.expectedErr { t.Errorf("Expected to fail with %s, but failed with %s", test.expectedErr, actualErr) } if test.expectedErr == nil && actualErr != nil { t.Errorf("Expected to pass, but failed with %s", actualErr) } }) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 36.8K bytes - Viewed (0) -
cmd/object-api-utils_test.go
} } } // Tests getCompleteMultipartMD5 func TestGetCompleteMultipartMD5(t *testing.T) { testCases := []struct { parts []CompletePart expectedResult string expectedErr string }{ // Wrong MD5 hash string, returns md5um of hash {[]CompletePart{{ETag: "wrong-md5-hash-string"}}, "0deb8cb07527b4b2669c861cb9653607-1", ""}, // Single CompletePart with valid MD5 hash string.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 24.1K bytes - Viewed (0)