mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +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:
parent
4a0eb6863d
commit
bd74711ceb
@ -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>
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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',
|
||||
|
1076
test/lib/pgBackRestTest/Module/Manifest/ManifestAllTest.pm
Normal file
1076
test/lib/pgBackRestTest/Module/Manifest/ManifestAllTest.pm
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user