mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-07 14:48:59 +01:00
Mark additional tests for sharding
This commit is contained in:
parent
c7d5ab0a43
commit
c97f381546
@ -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")()
|
||||
|
Loading…
Reference in New Issue
Block a user