1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-11 11:41:33 +02:00

tests: minor fixes for corruption detection

This commit is contained in:
Grigory Smolkin 2019-06-28 01:16:10 +03:00
parent 4a3ac209e0
commit eb2a397a01
2 changed files with 7 additions and 2 deletions

View File

@ -356,7 +356,7 @@ prepare_page(ConnectionArgs *arguments,
((strict && !is_ptrack_support) || !strict))
{
/* show this message for checkdb or backup without ptrack support */
elog(WARNING, "CORRUPTION in file %s, block %u",
elog(WARNING, "Corruption detected in file \"%s\", block %u",
file->path, blknum);
}

View File

@ -469,7 +469,12 @@ class BackupTest(ProbackupTest, unittest.TestCase):
repr(self.output), self.cmd))
except ProbackupException as e:
self.assertIn(
'Insert correct message',
'WARNING: Corruption detected in file',
e.message,
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
repr(e.message), self.cmd))
self.assertIn(
'ERROR: Data file corruption',
e.message,
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
repr(e.message), self.cmd))