You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Improved backup::full unit test.
This commit is contained in:
@ -168,6 +168,7 @@ sub BackRestTestBackup_Test
|
|||||||
my $iArchiveMax = 3;
|
my $iArchiveMax = 3;
|
||||||
my $strXlogPath = BackRestTestCommon_DbCommonPathGet() . '/pg_xlog';
|
my $strXlogPath = BackRestTestCommon_DbCommonPathGet() . '/pg_xlog';
|
||||||
my $strArchiveTestFile = BackRestTestCommon_DataPathGet() . '/test.archive.bin';
|
my $strArchiveTestFile = BackRestTestCommon_DataPathGet() . '/test.archive.bin';
|
||||||
|
my $iThreadMax = 8;
|
||||||
|
|
||||||
# Print test banner
|
# Print test banner
|
||||||
&log(INFO, "BACKUP MODULE ******************************************************************");
|
&log(INFO, "BACKUP MODULE ******************************************************************");
|
||||||
@ -449,14 +450,18 @@ sub BackRestTestBackup_Test
|
|||||||
{
|
{
|
||||||
for (my $bLarge = false; $bLarge <= false; $bLarge++)
|
for (my $bLarge = false; $bLarge <= false; $bLarge++)
|
||||||
{
|
{
|
||||||
for (my $bArchiveAsync = false; $bArchiveAsync <= $bRemote; $bArchiveAsync++)
|
for (my $bCompress = false; $bCompress <= false; $bCompress++)
|
||||||
|
{
|
||||||
|
for (my $bChecksum = false; $bChecksum <= false; $bChecksum++)
|
||||||
{
|
{
|
||||||
for (my $bHardlink = false; $bHardlink <= true; $bHardlink++)
|
for (my $bHardlink = false; $bHardlink <= true; $bHardlink++)
|
||||||
|
{
|
||||||
|
for (my $bArchiveAsync = false; $bArchiveAsync <= $bRemote; $bArchiveAsync++)
|
||||||
{
|
{
|
||||||
# Increment the run, log, and decide whether this unit test should be run
|
# Increment the run, log, and decide whether this unit test should be run
|
||||||
if (!BackRestTestCommon_Run(++$iRun,
|
if (!BackRestTestCommon_Run(++$iRun,
|
||||||
"rmt ${bRemote}, lrg ${bLarge}, arc_async ${bArchiveAsync}, " .
|
"rmt ${bRemote}, lrg ${bLarge}, cmp ${bCompress}, chk ${bChecksum}, " .
|
||||||
"hardlink ${bHardlink}")) {next}
|
"hardlink ${bHardlink}, arc_async ${bArchiveAsync}")) {next}
|
||||||
|
|
||||||
# Create the test directory
|
# Create the test directory
|
||||||
if ($bCreate)
|
if ($bCreate)
|
||||||
@ -466,29 +471,26 @@ sub BackRestTestBackup_Test
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Create db config
|
# Create db config
|
||||||
BackRestTestCommon_ConfigCreate('db', # local
|
BackRestTestCommon_ConfigCreate('db', # local
|
||||||
($bRemote ? REMOTE_BACKUP : undef), # remote
|
$bRemote ? REMOTE_BACKUP : undef, # remote
|
||||||
undef, # compress
|
$bCompress, # compress
|
||||||
undef, # checksum
|
$bChecksum, # checksum
|
||||||
undef, # hardlink
|
defined($bRemote) ? undef : $bHardlink, # hardlink
|
||||||
undef, # thread-max
|
defined($bRemote) ? undef : $iThreadMax, # thread-max
|
||||||
$bArchiveAsync, # archive-async
|
$bArchiveAsync, # archive-async
|
||||||
undef # compressasync
|
undef); # compress-async
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
# Create backup config
|
||||||
if ($bRemote)
|
if ($bRemote)
|
||||||
{
|
{
|
||||||
# Create backup config
|
BackRestTestCommon_ConfigCreate('backup', # local
|
||||||
BackRestTestCommon_ConfigCreate('backup', # local
|
$bRemote ? REMOTE_DB : undef, # remote
|
||||||
($bRemote ? REMOTE_DB : undef), # remote
|
$bCompress, # compress
|
||||||
undef, # compress
|
$bChecksum, # checksum
|
||||||
undef, # checksum
|
$bHardlink, # hardlink
|
||||||
$bHardlink, # hardlink
|
$iThreadMax, # thread-max
|
||||||
8, # thread-max
|
undef, # archive-async
|
||||||
undef, # archive-async
|
undef); # compress-async
|
||||||
undef, # compress-async
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (my $iFull = 1; $iFull <= 1; $iFull++)
|
for (my $iFull = 1; $iFull <= 1; $iFull++)
|
||||||
@ -511,6 +513,8 @@ sub BackRestTestBackup_Test
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$bCreate = true;
|
$bCreate = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user