10000 test_backup_via_unprivileged_user - test with ptrack correctly · postgrespro/pg_probackup@e674202 · GitHub
[go: up one dir, main page]

Skip to content

Commit e674202

Browse files
committed
test_backup_via_unprivileged_user - test with ptrack correctly
1 parent 8488b28 commit e674202

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/auth_test.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def test_backup_via_unprivileged_user(self):
3333
node = self.make_simple_node(
3434
base_dir=os.path.join(self.module_name, self.fname, 'node'),
3535
set_replication=True,
36+
ptrack_enable=self.ptrack,
3637
initdb_params=['--data-checksums'])
3738

3839
backup_dir = os.path.join(self.tmp_path, self.module_name, self.fname, 'backup')
@@ -41,6 +42,11 @@ def test_backup_via_unprivileged_user(self):
4142
self.set_archiving(backup_dir, 'node', node)
4243
node.slow_start()
4344

45+
if self.ptrack:
46+
node.safe_psql(
47+
"postgres",
48+
"CREATE EXTENSION ptrack")
49+
4450
node.safe_psql("postgres", "CREATE ROLE backup with LOGIN")
4551

4652
try:
@@ -160,9 +166,10 @@ def test_backup_via_unprivileged_user(self):
160166
backup_dir, 'node', node, options=['-U', 'backup'])
161167

162168
# PTRACK
163-
# self.backup_node(
164-
# backup_dir, 'node', node,
165-
# backup_type='ptrack', options=['-U', 'backup'])
169+
if self.ptrack:
170+
self.backup_node(
171+
backup_dir, 'node', node,
172+
backup_type='ptrack', options=['-U', 'backup'])
166173

167174

168175
class AuthTest(unittest.TestCase):

0 commit comments

Comments
 (0)
0