1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-13 01:00:23 +02:00

Add separate archive-push-async command.

This command was previously forked off from the archive-push command which required a bit of artificial option and log manipulation.

A separate command is easier to test and will work on platforms that don't have fork(), e.g. Windows.
This commit is contained in:
David Steele
2019-03-14 13:38:55 +04:00
parent 982b47c5ec
commit b8ebea6b1c
17 changed files with 203 additions and 72 deletions

View File

@ -21,7 +21,7 @@ testRun(void)
if (testBegin("cmdArchivePush()"))
{
StringList *argList = strLstNew();
strLstAddZ(argList, "pgbackrest");
strLstAddZ(argList, "pgbackrest-bogus");
strLstAddZ(argList, "--archive-timeout=1");
strLstAddZ(argList, "--stanza=db");
strLstAddZ(argList, "archive-push");
@ -33,7 +33,7 @@ testRun(void)
strLstAddZ(argList, "000000010000000100000001");
harnessCfgLoad(strLstSize(argList), strLstPtr(argList));
TEST_ERROR(cmdArchivePush(), AssertError, "archive-push in C does not support synchronous mode");
TEST_ERROR(cmdArchivePush(), OptionRequiredError , "===PERL-EMBED-ERROR===");
// Make sure the process times out when there is nothing to archive
// -------------------------------------------------------------------------------------------------------------------------