1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-11 00:50:20 +02:00

Fix incorrect result types in unit tests.

Upcoming changes to the TEST_RESULT_* macros are more type safe and identified that the wrong macros were being used to test results in many cases.

Commit these changes separately to verify that they work with the current macro versions.

Note that no core bugs were exposed by these changes.
This commit is contained in:
David Steele
2020-03-22 20:25:31 -04:00
parent e1da6a45e0
commit d6ffa9ea6d
29 changed files with 205 additions and 221 deletions

View File

@ -168,7 +168,7 @@ testRun(void)
TEST_RESULT_INT(
archiveGetFile(storageTest, archiveFile, walDestination, false, cipherTypeNone, NULL), 0, "WAL segment copied");
TEST_RESULT_BOOL(storageExistsP(storageTest, walDestination), true, " check exists");
TEST_RESULT_INT(storageInfoP(storageTest, walDestination).size, 16 * 1024 * 1024, " check size");
TEST_RESULT_UINT(storageInfoP(storageTest, walDestination).size, 16 * 1024 * 1024, " check size");
storageRemoveP(
storageTest,
@ -211,7 +211,7 @@ testRun(void)
archiveGetFile(
storageTest, archiveFile, walDestination, false, cipherTypeAes256Cbc, strNew("12345678")), 0, "WAL segment copied");
TEST_RESULT_BOOL(storageExistsP(storageTest, walDestination), true, " check exists");
TEST_RESULT_INT(storageInfoP(storageTest, walDestination).size, 16 * 1024 * 1024, " check size");
TEST_RESULT_UINT(storageInfoP(storageTest, walDestination).size, 16 * 1024 * 1024, " check size");
// Check protocol function directly
// -------------------------------------------------------------------------------------------------------------------------