- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 48 for expectedErr (0.06 seconds)
-
cmd/common-main_test.go
} tmpfile.WriteString(testCase.content) tmpfile.Sync() tmpfile.Close() value, err := readFromSecret(tmpfile.Name()) if err != nil && !testCase.expectedErr { t.Error(err) } if err == nil && testCase.expectedErr { t.Error(errors.New("expected error, found success")) } if value != testCase.expectedValue { t.Errorf("Expected %s, got %s", testCase.expectedValue, value) } })
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 3.7K bytes - Click Count (2) -
cmd/xl-storage-free-version_test.go
{ vol: newtierfi.Volume, name: newtierfi.Name, inclFreeVers: false, expectedErr: errFileNotFound, }, } for _, ft := range freeVersionsTests { fi, err := xl.ToFileInfo(ft.vol, ft.name, "", ft.inclFreeVers, true) if err != nil && !errors.Is(err, ft.expectedErr) { t.Fatalf("ToFileInfo failed due to %v", err) } if got := fi.TierFreeVersion(); got != ft.expectedFree {Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sat Mar 02 05:11:03 GMT 2024 - 7.8K bytes - Click Count (0) -
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)
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Tue Feb 18 16:25:55 GMT 2025 - 10.4K bytes - Click Count (0) -
cmd/streaming-signature-v4_test.go
}, } // Valid test cases for each chunk line. for i, tt := range testCases { chunkSize, chunkSignature, err := readChunkLine(tt.reader) if err != tt.expectedErr { t.Errorf("Test %d: Expected %s, got %s", i+1, tt.expectedErr, err) } if !bytes.Equal(chunkSize, tt.chunkSize) { t.Errorf("Test %d: Expected %s, got %s", i+1, string(tt.chunkSize), string(chunkSize)) }Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 5.7K bytes - Click Count (0) -
internal/auth/credentials_test.go
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 5.4K bytes - Click Count (0) -
cmd/object-api-multipart_test.go
} // Failed as expected, but does it fail for the expected reason. if actualErr != nil && !testCase.shouldPass { if !strings.Contains(actualErr.Error(), testCase.expectedErr.Error()) { t.Errorf("Test %d: %s: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, instanceType, testCase.expectedErr.Error(), actualErr.Error()) } }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 89.4K bytes - Click Count (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 {Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Tue Feb 18 16:25:55 GMT 2025 - 21.6K bytes - Click Count (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.Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 34.5K bytes - Click Count (0) -
cmd/object-handlers_test.go
i+1, instanceType, bucketName, testObject, err) } if test.expectedErr.Code != errXML.Code { t.Errorf("Test %d %s expected to fail with error %s, but received %s", i+1, instanceType, test.expectedErr.Code, errXML.Code) } } else if rec.Code != http.StatusOK { t.Errorf("Test %d %s expected to succeed, but failed with HTTP status code %d",Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 163.1K bytes - Click Count (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) } }) }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 38.3K bytes - Click Count (0)