mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-28 09:33:54 +02:00
tests: minor fixes
This commit is contained in:
parent
3d716efd01
commit
0d0802758a
@ -338,7 +338,7 @@ class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
with open(os.path.join(backup_dir, 'log', 'pg_probackup.log')) as f:
|
||||
log_content = f.read()
|
||||
self.assertIn('block 1, try to fetch via SQL', log_content)
|
||||
self.assertIn('SELECT pg_ptrack_get_block', log_content)
|
||||
self.assertIn('SELECT pg_catalog.pg_ptrack_get_block', log_content)
|
||||
f.close
|
||||
|
||||
self.assertTrue(
|
||||
@ -410,7 +410,7 @@ class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
"calculated checksum" in e.message and
|
||||
"ERROR: query failed: "
|
||||
"ERROR: invalid page in block" in e.message and
|
||||
"query was: SELECT pg_ptrack_get_block_2" in e.message,
|
||||
"query was: SELECT pg_catalog.pg_ptrack_get_block_2" in e.message,
|
||||
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
|
||||
repr(e.message), self.cmd))
|
||||
|
||||
|
@ -96,7 +96,7 @@ def is_enterprise():
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE
|
||||
)
|
||||
if 'postgrespro.ru' in p.communicate()[0]:
|
||||
if b'postgrespro.ru' in p.communicate()[0]:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
@ -837,6 +837,9 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
|
||||
node.start()
|
||||
|
||||
backup_id = self.backup_node(backup_dir, 'node', node)
|
||||
if self.paranoia:
|
||||
pgdata = self.pgdata_content(node.data_dir)
|
||||
|
||||
node.safe_psql("postgres", "create table t_heap(a int)")
|
||||
node.stop()
|
||||
node.cleanup()
|
||||
@ -848,6 +851,10 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
|
||||
options=["-j", "4", '--time={0}'.format(recovery_time)]),
|
||||
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(repr(self.output), self.cmd))
|
||||
|
||||
if self.paranoia:
|
||||
pgdata_restored = self.pgdata_content(node.data_dir)
|
||||
self.compare_pgdata(pgdata, pgdata_restored)
|
||||
|
||||
node.start()
|
||||
while node.safe_psql("postgres", "select pg_is_in_recovery()") == 't\n':
|
||||
time.sleep(1)
|
||||
|
Loading…
Reference in New Issue
Block a user