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

Various fixes and features implemented during doc development

* Better messaging for expiration.
* Fixed already stopped message.
* retention-archive and retention-archive-type now use retention-full and 'full' when not specified.
* Fixed issue where backup-user was required (should default to backrest).
* ExecuteTest now supports retries.
* Fixed issue where log test was not comparing test logs.
* Fixed issue where test logs would not match for ssh connection errors
This commit is contained in:
David Steele
2015-11-22 14:02:14 -05:00
parent 7ff9fc996c
commit 8ddfdcdd3b
34 changed files with 394 additions and 328 deletions

View File

@ -210,9 +210,12 @@ sub logWrite
default => sprintf("log/$self->{strModule}-$self->{strTest}-%03d.log", $self->{iRun}), trace => true}
);
my $strReferenceLogFile = "${strBasePath}/test/${strFileName}";
my $strTestLogFile;
if ($self->{bForce})
{
$strFileName = "${strBasePath}/test/${strFileName}";
$strTestLogFile = $strReferenceLogFile;
}
else
{
@ -224,17 +227,22 @@ sub logWrite
confess "unable to create test log path ${strTestLogPath}";
}
$strFileName = "${strTestPath}/${strFileName}";
$strTestLogFile = "${strTestPath}/${strFileName}";
}
open(my $hFile, '>', $strFileName)
or confess "could not open test log file '${strFileName}': $!";
open(my $hFile, '>', $strTestLogFile)
or confess "could not open test log file '${strTestLogFile}': $!";
syswrite($hFile, $self->{strLog})
or confess "could not write to test log file '${strFileName}': $!";
or confess "could not write to test log file '${strTestLogFile}': $!";
close($hFile);
if (!$self->{bForce})
{
executeTest("diff ${strReferenceLogFile} ${strTestLogFile}");
}
# Return from function and log return values if any
logDebugReturn($strOperation);
}
@ -364,6 +372,10 @@ sub regExpReplaceAll
"${strTimestampRegExp}\$", false);
$strLine = $self->regExpReplace($strLine, 'CHECKSUM', 'checksum=[\"]{0,1}[0-f]{40}', '[0-f]{40}$', false);
$strLine = $self->regExpReplace($strLine, 'REMOTE-PROCESS-TERMINATED-MESSAGE',
'remote process terminated: (ssh.*|no output from terminated process)$',
'(ssh.*|no output from terminated process)$', false);
return $strLine;
}