From c97f38154634391261e3b7a7314b7aa092ce2797 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sat, 10 Feb 2024 23:00:50 -0800 Subject: [PATCH] Mark additional tests for sharding --- client/client_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/client/client_test.go b/client/client_test.go index 20807a1..70be5d2 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1087,6 +1087,7 @@ echo other`) } func TestInstallViaPythonScriptWithCustomHishtoryPath(t *testing.T) { + markTestForSharding(t, 0) defer testutils.BackupAndRestore(t)() defer testutils.BackupAndRestoreEnv("HISHTORY_PATH")() altHishtoryPath := ".other-path" @@ -1101,6 +1102,7 @@ func TestInstallViaPythonScriptWithCustomHishtoryPath(t *testing.T) { } func TestInstallViaPythonScriptInOfflineMode(t *testing.T) { + markTestForSharding(t, 1) defer testutils.BackupAndRestore(t)() defer testutils.BackupAndRestoreEnv("HISHTORY_OFFLINE")() os.Setenv("HISHTORY_OFFLINE", "1") @@ -1157,6 +1159,7 @@ func testInstallViaPythonScriptChild(t *testing.T, tester shellTester) { } func TestInstallViaPythonScriptFromHead(t *testing.T) { + markTestForSharding(t, 2) defer testutils.BackupAndRestore(t)() tester := zshTester{} @@ -1268,6 +1271,7 @@ func testHelpCommand(t *testing.T, tester shellTester) { func TestStripBashTimePrefix(t *testing.T) { // Setup + markTestForSharding(t, 4) defer testutils.BackupAndRestore(t)() tester := bashTester{} installHishtory(t, tester, "") @@ -1660,6 +1664,7 @@ func testHandleUpgradedFeatures(t *testing.T, tester shellTester) { func TestFish(t *testing.T) { // Setup + markTestForSharding(t, 5) defer testutils.BackupAndRestore(t)() tester := bashTester{} installHishtory(t, tester, "") @@ -2619,6 +2624,7 @@ echo bar`) func TestTimestampFormat(t *testing.T) { // Setup + markTestForSharding(t, 6) tester := zshTester{} defer testutils.BackupAndRestore(t)() userSecret := installHishtory(t, tester, "") @@ -2656,6 +2662,7 @@ func TestTimestampFormat(t *testing.T) { func TestSortByConsistentTimezone(t *testing.T) { // Setup + markTestForSharding(t, 7) tester := zshTester{} defer testutils.BackupAndRestore(t)() installHishtory(t, tester, "") @@ -2695,6 +2702,7 @@ func TestSortByConsistentTimezone(t *testing.T) { func TestZDotDir(t *testing.T) { // Setup + markTestForSharding(t, 8) tester := zshTester{} defer testutils.BackupAndRestore(t)() defer testutils.BackupAndRestoreEnv("ZDOTDIR")() @@ -2729,6 +2737,7 @@ func TestZDotDir(t *testing.T) { func TestRemoveDuplicateRows(t *testing.T) { // Setup + markTestForSharding(t, 9) tester := zshTester{} defer testutils.BackupAndRestore(t)() installHishtory(t, tester, "") @@ -2781,6 +2790,7 @@ echo foo`) func TestSetConfigNoCorruption(t *testing.T) { // Setup + markTestForSharding(t, 10) tester := zshTester{} defer testutils.BackupAndRestore(t)() installHishtory(t, tester, "") @@ -2815,6 +2825,7 @@ func TestSetConfigNoCorruption(t *testing.T) { // Test that the config retrieved from the context is a reference and there are no consistency issues with it getting out of sync func TestCtxConfigIsReference(t *testing.T) { // Setup + markTestForSharding(t, 11) tester := zshTester{} defer testutils.BackupAndRestore(t)() installHishtory(t, tester, "") @@ -2926,6 +2937,7 @@ func createSyntheticImportEntries(t testing.TB, numSyntheticEntries int) { func TestImportHistory(t *testing.T) { // Setup + markTestForSharding(t, 11) tester := bashTester{} defer testutils.BackupAndRestore(t)() userSecret := installHishtory(t, tester, "") @@ -2980,6 +2992,7 @@ func BenchmarkImport(b *testing.B) { } func TestAugmentedIsOfflineError(t *testing.T) { + markTestForSharding(t, 12) defer testutils.BackupAndRestore(t)() installHishtory(t, zshTester{}, "") defer testutils.BackupAndRestoreEnv("HISHTORY_SIMULATE_NETWORK_ERROR")()