1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-25 09:01:48 +02:00

tests: minor fix

This commit is contained in:
Grigory Smolkin 2019-10-02 17:30:55 +03:00
parent 6fe844004e
commit 4cf86c50c0

View File

@ -81,14 +81,15 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
self.backup_node(
backup_dir, 'node', node, options=['--log-level-file=verbose'])
if self.paranoia:
pgdata = self.pgdata_content(node.data_dir)
pgdata = self.pgdata_content(node.data_dir)
if not self.remote:
log_file_path = os.path.join(backup_dir, "log", "pg_probackup.log")
with open(log_file_path) as f:
self.assertTrue(
'{0} blknum 1, empty page'.format(file_path) in f.read(),
log_content = f.read()
self.assertIn(
'File: "{0}" blknum 1, empty page'.format(file),
log_content,
'Failed to detect nullified block')
self.validate_pb(backup_dir, options=["-j", "4"])
@ -96,9 +97,8 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
self.restore_node(backup_dir, 'node', node)
if self.paranoia:
pgdata_restored = self.pgdata_content(node.data_dir)
self.compare_pgdata(pgdata, pgdata_restored)
pgdata_restored = self.pgdata_content(node.data_dir)
self.compare_pgdata(pgdata, pgdata_restored)
# Clean after yourself
self.del_test_dir(module_name, fname)