You've already forked pg_probackup
mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-09-16 09:26:30 +02:00
tests: move ptrack module to python3
This commit is contained in:
@@ -89,7 +89,7 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
|
|||||||
|
|
||||||
xid = node.safe_psql(
|
xid = node.safe_psql(
|
||||||
'postgres',
|
'postgres',
|
||||||
'SELECT txid_current()').rstrip()
|
'SELECT txid_current()').decode('utf-8').rstrip()
|
||||||
pgbench.wait()
|
pgbench.wait()
|
||||||
|
|
||||||
self.backup_node(backup_dir, 'node', node, backup_type='ptrack')
|
self.backup_node(backup_dir, 'node', node, backup_type='ptrack')
|
||||||
@@ -126,7 +126,7 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
|
|||||||
'select (select sum(tbalance) from pgbench_tellers) - '
|
'select (select sum(tbalance) from pgbench_tellers) - '
|
||||||
'( select sum(bbalance) from pgbench_branches) + '
|
'( select sum(bbalance) from pgbench_branches) + '
|
||||||
'( select sum(abalance) from pgbench_accounts ) - '
|
'( select sum(abalance) from pgbench_accounts ) - '
|
||||||
'(select sum(delta) from pgbench_history) as must_be_zero').rstrip()
|
'(select sum(delta) from pgbench_history) as must_be_zero').decode('utf-8').rstrip()
|
||||||
|
|
||||||
self.assertEqual('0', balance)
|
self.assertEqual('0', balance)
|
||||||
|
|
||||||
@@ -275,7 +275,7 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
|
|||||||
'select (select sum(tbalance) from pgbench_tellers) - '
|
'select (select sum(tbalance) from pgbench_tellers) - '
|
||||||
'( select sum(bbalance) from pgbench_branches) + '
|
'( select sum(bbalance) from pgbench_branches) + '
|
||||||
'( select sum(abalance) from pgbench_accounts ) - '
|
'( select sum(abalance) from pgbench_accounts ) - '
|
||||||
'(select sum(delta) from pgbench_history) as must_be_zero').rstrip()
|
'(select sum(delta) from pgbench_history) as must_be_zero').decode('utf-8').rstrip()
|
||||||
|
|
||||||
self.assertEqual('0', balance)
|
self.assertEqual('0', balance)
|
||||||
|
|
||||||
@@ -1108,6 +1108,13 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
|
|||||||
if self.paranoia:
|
if self.paranoia:
|
||||||
pgdata = self.pgdata_content(node.data_dir)
|
pgdata = self.pgdata_content(node.data_dir)
|
||||||
|
|
||||||
|
node.safe_psql(
|
||||||
|
"postgres",
|
||||||
|
"insert into t_heap select i as id,"
|
||||||
|
" md5(i::text) as text,"
|
||||||
|
" md5(i::text)::tsvector as tsvector"
|
||||||
|
" from generate_series(200, 300) i")
|
||||||
|
|
||||||
# Drop Node
|
# Drop Node
|
||||||
node.cleanup()
|
node.cleanup()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user