Skip to content

Commit 5c751cb

Browse files
committed
tests: fix tests.validate.ValidateTest.test_validate_corrupt_tablespace_map
1 parent 93e8a99 commit 5c751cb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/validate.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3429,7 +3429,19 @@ def test_validate_corrupt_tablespace_map(self):
34293429
f.flush()
34303430
f.close
34313431

3432-
self.validate_pb(backup_dir, 'node', backup_id=backup_id)
3432+
try:
3433+
self.validate_pb(backup_dir, 'node', backup_id=backup_id)
3434+
self.assertEqual(
3435+
1, 0,
3436+
"Expecting Error because tablespace_map is corrupted.\n "
3437+
"Output: {0} \n CMD: {1}".format(
3438+
self.output, self.cmd))
3439+
except ProbackupException as e:
3440+
self.assertIn(
3441+
'WARNING: Invalid CRC of backup file',
3442+
e.message,
3443+
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
3444+
repr(e.message), self.cmd))
34333445

34343446
# validate empty backup list
34353447
# page from future during validate

0 commit comments

Comments
 (0)