You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Convert BackupType enum to StringId.
Allows removal of backupType()/backupTypeStr() and improves debug logging of the enum. Move BackupType enum and string constants to info/infoBackup.h so they are available to more modules. Also convert InfoBackup to use BackupType instead of a String.
This commit is contained in:
@ -311,18 +311,5 @@ testRun(void)
|
||||
TEST_ERROR(ioWrite(write, buffer), AssertError, "should not be possible to see two misaligned pages in a row");
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
if (testBegin("backupType() and backupTypeStr()"))
|
||||
{
|
||||
TEST_RESULT_UINT(backupType(strNew("full")), backupTypeFull, "backup type full");
|
||||
TEST_RESULT_UINT(backupType(strNew("diff")), backupTypeDiff, "backup type diff");
|
||||
TEST_RESULT_UINT(backupType(strNew("incr")), backupTypeIncr, "backup type incr");
|
||||
TEST_ERROR(backupType(strNew("bogus")), AssertError, "invalid backup type 'bogus'");
|
||||
|
||||
TEST_RESULT_STR_Z(backupTypeStr(backupTypeFull), "full", "backup type str full");
|
||||
TEST_RESULT_STR_Z(backupTypeStr(backupTypeDiff), "diff", "backup type str diff");
|
||||
TEST_RESULT_STR_Z(backupTypeStr(backupTypeIncr), "incr", "backup type str incr");
|
||||
}
|
||||
|
||||
FUNCTION_HARNESS_RETURN_VOID();
|
||||
}
|
||||
|
Reference in New Issue
Block a user