mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-03-05 15:05:48 +02:00
Fixed --no-online tests to suppress expected errors.
This commit is contained in:
parent
efdf64506a
commit
1666ee177f
@ -318,6 +318,12 @@
|
|||||||
</release-doc-list>
|
</release-doc-list>
|
||||||
|
|
||||||
<release-test-list>
|
<release-test-list>
|
||||||
|
<release-bug-list>
|
||||||
|
<release-item>
|
||||||
|
<p>Fixed <br-option>--no-online</br-option> tests to suppress expected errors.</p>
|
||||||
|
</release-item>
|
||||||
|
</release-bug-list>
|
||||||
|
|
||||||
<release-feature-list>
|
<release-feature-list>
|
||||||
<release-item>
|
<release-item>
|
||||||
<p>Added integration for testing coverage with <code>Devel::Cover</code>.</p>
|
<p>Added integration for testing coverage with <code>Devel::Cover</code>.</p>
|
||||||
|
@ -823,28 +823,6 @@ sub run
|
|||||||
$oHostDbMaster->sqlSelectOneTest('select message from test', $strTimelineMessage, {iTimeout => 120});
|
$oHostDbMaster->sqlSelectOneTest('select message from test', $strTimelineMessage, {iTimeout => 120});
|
||||||
}
|
}
|
||||||
|
|
||||||
# Incr backup - make sure a --no-online backup fails
|
|
||||||
#---------------------------------------------------------------------------------------------------------------------------
|
|
||||||
if ($bTestExtra)
|
|
||||||
{
|
|
||||||
$strType = BACKUP_TYPE_INCR;
|
|
||||||
|
|
||||||
$oHostBackup->backup(
|
|
||||||
$strType, 'fail on --no-' . OPTION_ONLINE,
|
|
||||||
{iExpectedExitStatus => ERROR_POSTMASTER_RUNNING, strOptionalParam => '--no-' . OPTION_ONLINE});
|
|
||||||
}
|
|
||||||
|
|
||||||
# Incr backup - allow --no-online backup to succeed with --force
|
|
||||||
#---------------------------------------------------------------------------------------------------------------------------
|
|
||||||
if ($bTestExtra)
|
|
||||||
{
|
|
||||||
$strType = BACKUP_TYPE_INCR;
|
|
||||||
|
|
||||||
$oHostBackup->backup(
|
|
||||||
$strType, 'succeed on --no-' . OPTION_ONLINE . ' with --' . OPTION_FORCE,
|
|
||||||
{strOptionalParam => '--no-' . OPTION_ONLINE . ' --' . OPTION_FORCE});
|
|
||||||
}
|
|
||||||
|
|
||||||
# Stop clusters to catch any errors in the postgres log
|
# Stop clusters to catch any errors in the postgres log
|
||||||
#---------------------------------------------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------------------------------------------
|
||||||
$oHostDbMaster->clusterStop({bImmediate => true});
|
$oHostDbMaster->clusterStop({bImmediate => true});
|
||||||
@ -853,6 +831,30 @@ sub run
|
|||||||
{
|
{
|
||||||
$oHostDbStandby->clusterStop({bImmediate => true});
|
$oHostDbStandby->clusterStop({bImmediate => true});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Test no-online backups
|
||||||
|
#---------------------------------------------------------------------------------------------------------------------------
|
||||||
|
if ($bTestExtra)
|
||||||
|
{
|
||||||
|
# Create a postmaster.pid file so it appears that the server is running
|
||||||
|
fileStringWrite($oHostDbMaster->dbBasePath() . '/postmaster.pid', '99999');
|
||||||
|
|
||||||
|
# Incr backup - make sure a --no-online backup fails
|
||||||
|
#-----------------------------------------------------------------------------------------------------------------------
|
||||||
|
$strType = BACKUP_TYPE_INCR;
|
||||||
|
|
||||||
|
$oHostBackup->backup(
|
||||||
|
$strType, 'fail on --no-' . OPTION_ONLINE,
|
||||||
|
{iExpectedExitStatus => ERROR_POSTMASTER_RUNNING, strOptionalParam => '--no-' . OPTION_ONLINE});
|
||||||
|
|
||||||
|
# Incr backup - allow --no-online backup to succeed with --force
|
||||||
|
#-----------------------------------------------------------------------------------------------------------------------
|
||||||
|
$strType = BACKUP_TYPE_INCR;
|
||||||
|
|
||||||
|
$oHostBackup->backup(
|
||||||
|
$strType, 'succeed on --no-' . OPTION_ONLINE . ' with --' . OPTION_FORCE,
|
||||||
|
{strOptionalParam => '--no-' . OPTION_ONLINE . ' --' . OPTION_FORCE});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user