1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-03 14:01:57 +02:00

tests: various fixes

This commit is contained in:
Grigory Smolkin 2019-12-28 18:53:33 +03:00
parent d785bea5fb
commit 68922f2151
3 changed files with 23 additions and 2 deletions

View File

@ -1865,6 +1865,10 @@ class MergeTest(ProbackupTest, unittest.TestCase):
backup_dir, 'node', node, backup_type='page')
pgdata = self.pgdata_content(node.data_dir)
result = node.safe_psql(
'postgres',
'SELECT * from pgbench_accounts')
node_restored = self.make_simple_node(
base_dir=os.path.join(module_name, fname, 'node_restored'))
node_restored.cleanup()
@ -1883,6 +1887,18 @@ class MergeTest(ProbackupTest, unittest.TestCase):
backup_dir, 'node',
node_restored, backup_id=backup_id)
pgdata_restored = self.pgdata_content(node_restored.data_dir)
self.set_auto_conf(
node_restored,
{'port': node_restored.port})
node_restored.slow_start()
result_new = node_restored.safe_psql(
'postgres',
'SELECT * from pgbench_accounts')
self.assertTrue(result, result_new)
self.compare_pgdata(pgdata, pgdata_restored)
# Clean after yourself

View File

@ -2748,6 +2748,7 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_partial_restore_backward_compatibility_1(self):
"""
old binary should be version < 2.2.0
"""
fname = self.id().split('.')[3]
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')

View File

@ -311,7 +311,9 @@ class SetBackupTest(ProbackupTest, unittest.TestCase):
# sanity
for timeline in timelines:
self.assertEqual(timeline['min-segno'], '0000000000000004')
self.assertEqual(
timeline['min-segno'],
'000000010000000000000004')
self.assertEqual(timeline['status'], 'OK')
# Clean after yourself
@ -373,7 +375,9 @@ class SetBackupTest(ProbackupTest, unittest.TestCase):
# sanity
for timeline in timelines:
self.assertEqual(timeline['min-segno'], '0000000000000002')
self.assertEqual(
timeline['min-segno'],
'000000010000000000000002')
self.assertEqual(timeline['status'], 'OK')
self.validate_pb(backup_dir)