1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00

Add unit tests for the Manifest module.

Also minor changes to Manifest module, mostly for test reproducibility.

Contributed by Cynthia Shang.
This commit is contained in:
Cynthia Shang 2017-11-28 11:44:24 -05:00 committed by David Steele
parent 4a0eb6863d
commit bd74711ceb
4 changed files with 1113 additions and 3 deletions

View File

@ -38,6 +38,14 @@
<release-item>
<p>Remove deprecated <br-option>archive-max-mb</br-option> option.</p>
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="shang.cynthia"/>
</release-item-contributor-list>
<p>Minor changes to <code>Manifest</code> module, mostly for test reproducibility.</p>
</release-item>
</release-development-list>
</release-core-list>
@ -66,6 +74,14 @@
<release-item>
<p>Sync time to prevent build failures when running on VirtualBox.</p>
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="shang.cynthia"/>
</release-item-contributor-list>
<p>Add unit tests for the <code>Manifest</code> module.</p>
</release-item>
</release-development-list>
</release-test-list>
</release>

View File

@ -308,7 +308,7 @@ sub new
{
if (!defined($strDbVersion))
{
&log(ASSERT, 'strDbVersion must be provided with bLoad = false');
confess &log(ASSERT, 'strDbVersion must be provided with bLoad = false');
}
$self->set(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION, undef, $strDbVersion);
@ -1113,7 +1113,7 @@ sub buildDefault
my $strMaxValue;
my $iMaxValueTotal = 0;
foreach my $strValue (keys(%oDefault))
foreach my $strValue (sort(keys(%oDefault)))
{
if ($oDefault{$strValue} > $iMaxValueTotal)
{
@ -1215,7 +1215,7 @@ sub walPath
####################################################################################################################################
# isMasterFile
#
# Is this file required to copied from the master?
# Is this file required to be copied from the master?
####################################################################################################################################
sub isMasterFile
{

View File

@ -588,6 +588,24 @@ my $oTestDef =
},
]
},
# Manifest tests
{
&TESTDEF_NAME => 'manifest',
&TESTDEF_TEST =>
[
{
&TESTDEF_NAME => 'all',
&TESTDEF_TOTAL => 9,
&TESTDEF_CONTAINER => true,
&TESTDEF_COVERAGE =>
{
'Manifest' => TESTDEF_COVERAGE_PARTIAL,
},
},
]
},
# Stanza tests
{
&TESTDEF_NAME => 'stanza',

File diff suppressed because it is too large Load Diff