Skip to content

Commit fc752c8

Browse files
committed
Stabilize tests.checkdb.CheckdbTest.test_checkdb_with_least_privileges: accounting differences in amcheck versions in various editions of PG-10 (bd81f7f follow-up)
1 parent 0c3aff7 commit fc752c8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Diff for: tests/checkdb.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,18 @@ def test_checkdb_with_least_privileges(self):
621621
'GRANT EXECUTE ON FUNCTION pg_catalog.oideq(oid, oid) TO backup; '
622622
'GRANT EXECUTE ON FUNCTION pg_catalog.charne("char", "char") TO backup; '
623623
'GRANT EXECUTE ON FUNCTION pg_catalog.pg_is_in_recovery() TO backup; '
624-
'GRANT EXECUTE ON FUNCTION pg_catalog.pg_control_system() TO backup; '
625-
'GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO backup;'
624+
'GRANT EXECUTE ON FUNCTION pg_catalog.pg_control_system() TO backup;'
626625
)
626+
if ProbackupTest.enterprise:
627+
# amcheck-1.1
628+
node.safe_psql(
629+
'backupdb',
630+
'GRANT EXECUTE ON FUNCTION bt_index_check(regclass, bool) TO backup')
631+
else:
632+
# amcheck-1.0
633+
node.safe_psql(
634+
'backupdb',
635+
'GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO backup')
627636
# >= 11
628637
else:
629638
node.safe_psql(

0 commit comments

Comments
 (0)