mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-24 08:52:38 +02:00
tests: fix test_archive_node_backup_archive_pitr_2()
This commit is contained in:
parent
0aa14030f6
commit
49705d73f4
@ -1160,7 +1160,10 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
|
||||
|
||||
node.safe_psql("postgres", "create table t_heap(a int)")
|
||||
node.stop()
|
||||
node.cleanup()
|
||||
|
||||
node_restored = self.make_simple_node(
|
||||
base_dir=os.path.join(module_name, fname, 'node_restored'))
|
||||
node_restored.cleanup()
|
||||
|
||||
recovery_time = self.show_pb(
|
||||
backup_dir, 'node', backup_id)['recovery-time']
|
||||
@ -1168,7 +1171,7 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
|
||||
self.assertIn(
|
||||
"INFO: Restore of backup {0} completed.".format(backup_id),
|
||||
self.restore_node(
|
||||
backup_dir, 'node', node,
|
||||
backup_dir, 'node', node_restored,
|
||||
options=[
|
||||
"-j", "4", '--time={0}'.format(recovery_time),
|
||||
"--recovery-target-action=promote"
|
||||
@ -1178,12 +1181,12 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
|
||||
repr(self.output), self.cmd))
|
||||
|
||||
if self.paranoia:
|
||||
pgdata_restored = self.pgdata_content(node.data_dir)
|
||||
pgdata_restored = self.pgdata_content(node_restored.data_dir)
|
||||
self.compare_pgdata(pgdata, pgdata_restored)
|
||||
|
||||
node.slow_start()
|
||||
node_restored.slow_start()
|
||||
|
||||
result = node.psql("postgres", 'select * from t_heap')
|
||||
result = node_restored.psql("postgres", 'select * from t_heap')
|
||||
self.assertTrue('does not exist' in result[2].decode("utf-8"))
|
||||
|
||||
# Clean after yourself
|
||||
|
Loading…
Reference in New Issue
Block a user