You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-13 01:00:23 +02:00
Move WAL path prefix logic into walPath().
This logic is used by both archive-push and archive-get.
This commit is contained in:
@ -168,6 +168,20 @@ testRun(void)
|
||||
TEST_RESULT_BOOL(walIsSegment(strNew("0000001A.history")), false, "history file");
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
if (testBegin("walPath()"))
|
||||
{
|
||||
TEST_RESULT_STR(
|
||||
strPtr(walPath(strNew("/absolute/path"), strNew("/pg"), strNew("test"))), "/absolute/path", "absolute path");
|
||||
TEST_RESULT_STR(
|
||||
strPtr(walPath(strNew("relative/path"), strNew("/pg"), strNew("test"))), "/pg/relative/path", "relative path");
|
||||
TEST_ERROR(
|
||||
walPath(strNew("relative/path"), NULL, strNew("test")), OptionRequiredError,
|
||||
"option 'pg1-path' must be specified when relative wal paths are used\n"
|
||||
"HINT: Is %f passed to test instead of %p?\n"
|
||||
"HINT: PostgreSQL may pass relative paths even with %p depending on the environment.");
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
if (testBegin("walSegmentFind()"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user