You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Clear test directory between test runs.
Previously it was the responsibility of the individual tests to clean up after themselves. Now the test harness now does the cleanup automatically. This means that some paths/files need to be recreated with each run but that doesn't happen very often. An attempt has been made to remove all redundant cleanup code but it's hard to know if everything has been caught. No issues will be caused by anything that was missed, but they will continue to chew up time in the tests.
This commit is contained in:
@ -120,10 +120,6 @@ testRun(void)
|
||||
storagePutNP(storageNewWriteNP(storageTest, strNew("repo/archive/test1/10-4/00000009.history")), NULL);
|
||||
|
||||
TEST_RESULT_STR(strPtr(archiveGetCheck(strNew("00000009.history"))), "10-4/00000009.history", "history file found");
|
||||
|
||||
// Clear data
|
||||
storagePathRemoveP(storageTest, strNew("repo"), .recurse = true);
|
||||
storagePathRemoveP(storageTest, strNew("db"), .recurse = true);
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
@ -202,10 +198,6 @@ testRun(void)
|
||||
TEST_RESULT_INT(archiveGetFile(archiveFile, walDestination), 0, "WAL segment copied");
|
||||
TEST_RESULT_BOOL(storageExistsNP(storageTest, walDestination), true, " check exists");
|
||||
TEST_RESULT_INT(storageInfoNP(storageTest, walDestination).size, 16 * 1024 * 1024, " check size");
|
||||
|
||||
// Clear data
|
||||
storagePathRemoveP(storageTest, strNew("repo"), .recurse = true);
|
||||
storagePathRemoveP(storageTest, strNew("db"), .recurse = true);
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
@ -278,8 +270,6 @@ testRun(void)
|
||||
TEST_RESULT_STR(
|
||||
strPtr(strLstJoin(strLstSort(storageListNP(storageSpool(), strNew(STORAGE_SPOOL_ARCHIVE_IN)), sortOrderAsc), "|")),
|
||||
"000000010000000A00000FFE|000000010000000A00000FFF", "check queue");
|
||||
|
||||
storagePathRemoveP(storageSpoolWrite(), strNew(STORAGE_SPOOL_ARCHIVE_IN), .recurse = true);
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
|
Reference in New Issue
Block a user