mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-02-12 14:56:08 +02:00
[Issue #369] fix tests
This commit is contained in:
parent
36f21a963e
commit
b14dda4d49
@ -149,13 +149,11 @@ class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
repr(self.output), self.cmd))
|
||||
except ProbackupException as e:
|
||||
self.assertTrue(
|
||||
"WARNING: Valid backup on current timeline 1 is not found" in e.message and
|
||||
"WARNING: Valid full backup on current timeline 1 is not found" in e.message and
|
||||
"ERROR: Create new full backup before an incremental one" in e.message,
|
||||
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
|
||||
repr(e.message), self.cmd))
|
||||
|
||||
sleep(1)
|
||||
|
||||
try:
|
||||
self.backup_node(backup_dir, 'node', node, backup_type="ptrack")
|
||||
# we should die here because exception is what we expect to happen
|
||||
@ -166,7 +164,7 @@ class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
repr(self.output), self.cmd))
|
||||
except ProbackupException as e:
|
||||
self.assertTrue(
|
||||
"WARNING: Valid backup on current timeline 1 is not found" in e.message and
|
||||
"WARNING: Valid full backup on current timeline 1 is not found" in e.message and
|
||||
"ERROR: Create new full backup before an incremental one" in e.message,
|
||||
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
|
||||
repr(e.message), self.cmd))
|
||||
@ -230,7 +228,7 @@ class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
repr(self.output), self.cmd))
|
||||
except ProbackupException as e:
|
||||
self.assertTrue(
|
||||
"WARNING: Valid backup on current timeline 1 is not found" in e.message and
|
||||
"WARNING: Valid full backup on current timeline 1 is not found" in e.message and
|
||||
"ERROR: Create new full backup before an incremental one" in e.message,
|
||||
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
|
||||
repr(e.message), self.cmd))
|
||||
@ -2352,7 +2350,7 @@ class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
repr(self.output), self.cmd))
|
||||
except ProbackupException as e:
|
||||
self.assertTrue(
|
||||
'WARNING: Valid backup on current timeline 1 is not found' in e.message and
|
||||
'WARNING: Valid full backup on current timeline 1 is not found' in e.message and
|
||||
'ERROR: Create new full backup before an incremental one' in e.message,
|
||||
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
|
||||
repr(e.message), self.cmd))
|
||||
@ -3404,7 +3402,7 @@ class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
return_id=False)
|
||||
|
||||
self.assertIn(
|
||||
'WARNING: Valid backup on current timeline 2 is not found, trying to look up on previous timelines',
|
||||
'WARNING: Valid full backup on current timeline 2 is not found, trying to look up on previous timelines',
|
||||
output)
|
||||
|
||||
self.assertIn(
|
||||
|
@ -83,12 +83,10 @@ class FalsePositive(ProbackupTest, unittest.TestCase):
|
||||
except ProbackupException as e:
|
||||
self.assertEqual(
|
||||
e.message,
|
||||
'ERROR: Valid backup on current timeline is not found. '
|
||||
'ERROR: Valid full 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))
|
||||
|
||||
sleep(1)
|
||||
self.assertFalse(
|
||||
True,
|
||||
"Expecting Error because page backup should not be "
|
||||
@ -98,7 +96,7 @@ class FalsePositive(ProbackupTest, unittest.TestCase):
|
||||
except ProbackupException as e:
|
||||
self.assertEqual(
|
||||
e.message,
|
||||
'ERROR: Valid backup on current timeline is not found. '
|
||||
'ERROR: Valid full 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))
|
||||
|
@ -1712,7 +1712,7 @@ class RetentionTest(ProbackupTest, unittest.TestCase):
|
||||
repr(self.output), self.cmd))
|
||||
except ProbackupException as e:
|
||||
self.assertTrue(
|
||||
"WARNING: Valid backup on current timeline 1 is not found" in e.message and
|
||||
"WARNING: Valid full backup on current timeline 1 is not found" in e.message and
|
||||
"ERROR: Create new full backup before an incremental one" in e.message,
|
||||
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
|
||||
repr(e.message), self.cmd))
|
||||
|
Loading…
x
Reference in New Issue
Block a user