1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-07-06 05:57:21 +02:00

tests: fixes

This commit is contained in:
Grigory Smolkin
2017-12-13 11:15:42 +03:00
parent 39519f74c7
commit 277e4101d8
11 changed files with 106 additions and 100 deletions

View File

@ -113,9 +113,10 @@ class BackupTest(ProbackupTest, unittest.TestCase):
self.assertEqual(1, 0, "Expecting Error because page backup should not be possible without valid full backup.\n Output: {0} \n CMD: {1}".format(
repr(self.output), self.cmd))
except ProbackupException as e:
self.assertEqual(e.message,
'ERROR: Valid backup on current timeline is not found. Create new FULL backup before an incremental one.\n',
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(repr(e.message), self.cmd))
self.assertIn(
"ERROR: Valid backup on current timeline is not found. Create new FULL backup before an incremental one.",
e.message,
"\n Unexpected Error Message: {0}\n CMD: {1}".format(repr(e.message), self.cmd))
sleep(1)
@ -125,9 +126,10 @@ class BackupTest(ProbackupTest, unittest.TestCase):
self.assertEqual(1, 0, "Expecting Error because page backup should not be possible without valid full backup.\n Output: {0} \n CMD: {1}".format(
repr(self.output), self.cmd))
except ProbackupException as e:
self.assertEqual(e.message,
'ERROR: Valid backup on current timeline is not found. Create new FULL backup before an incremental one.\n',
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(repr(e.message), self.cmd))
self.assertIn(
"ERROR: Valid backup on current timeline is not found. Create new FULL backup before an incremental one.",
e.message,
"\n Unexpected Error Message: {0}\n CMD: {1}".format(repr(e.message), self.cmd))
self.assertEqual(self.show_pb(backup_dir, 'node')[0]['Status'], "ERROR")
@ -170,8 +172,9 @@ class BackupTest(ProbackupTest, unittest.TestCase):
self.assertEqual(1, 0, "Expecting Error because page backup should not be possible without valid full backup.\n Output: {0} \n CMD: {1}".format(
repr(self.output), self.cmd))
except ProbackupException as e:
self.assertEqual(e.message,
"ERROR: Valid backup on current timeline is not found. Create new FULL backup before an incremental one.\n",
self.assertIn(
"ERROR: Valid backup on current timeline is not found. Create new FULL backup before an incremental one.",
e.message,
"\n Unexpected Error Message: {0}\n CMD: {1}".format(repr(e.message), self.cmd))
# sleep(1)