diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad21f60..c05f5ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: - supautils postgres: [13, 14, 15, 16, 17] box: - - { runner: ubuntu-20.04, arch: amd64 } + - { runner: ubuntu-latest, arch: amd64 } - { runner: arm-runner, arch: arm64 } runs-on: ${{ matrix.box.runner }} steps: diff --git a/test/expected/extension_custom_scripts.out b/test/expected/extension_custom_scripts.out index 68dbfbf..13bf161 100644 --- a/test/expected/extension_custom_scripts.out +++ b/test/expected/extension_custom_scripts.out @@ -2,6 +2,14 @@ set role extensions_role; \echo -- per-extension custom scripts are run +drop extension if exists citext; +NOTICE: extension "citext" does not exist, skipping +create extension autoinc; +drop extension citext; +drop extension autoinc; +\echo + +-- per-extension custom scripts are run for extensions not in privileged_extensions create extension fuzzystrmatch; drop extension fuzzystrmatch; select * from t2; diff --git a/test/init.conf.in b/test/init.conf.in index d2488ad..f6daca3 100644 --- a/test/init.conf.in +++ b/test/init.conf.in @@ -6,7 +6,7 @@ wal_level=logical supautils.reserved_roles='supabase_storage_admin, anon, reserved_but_not_yet_created, authenticator*' supautils.reserved_memberships='pg_read_server_files,pg_write_server_files,pg_execute_server_program,role_with_reserved_membership' -supautils.privileged_extensions='autoinc, citext, hstore, sslinfo, insert_username, dict_xsyn, fuzzystrmatch, postgres_fdw, pageinspect' +supautils.privileged_extensions='autoinc, citext, hstore, sslinfo, insert_username, dict_xsyn, postgres_fdw, pageinspect' supautils.constrained_extensions='{"adminpack": { "cpu": 64}, "cube": { "mem": "17 GB"}, "lo": { "disk": "100 GB"}, "amcheck": { "cpu": 2, "mem": "100 MB", "disk": "100 MB"}}' supautils.privileged_role='privileged_role' supautils.privileged_role_allowed_configs='session_replication_role, pgrst.*, other.nested.*' diff --git a/test/init.sh b/test/init.sh index c80646b..389c4fb 100644 --- a/test/init.sh +++ b/test/init.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env sh + # print notice when creating an extension mkdir -p "$TMPDIR/extension-custom-scripts" echo "do \$\$ diff --git a/test/init.sql b/test/init.sql index a526bbe..847e70b 100644 --- a/test/init.sql +++ b/test/init.sql @@ -22,7 +22,7 @@ grant all on database postgres to privileged_role; -- non-superuser extensions role create role extensions_role login nosuperuser; -grant all on database postgres to extensions_role; +grant all on database contrib_regression, postgres to extensions_role; alter default privileges for role postgres in schema public grant all on tables to extensions_role; -- non-superuser that should be unaffected by extension logic when creating db objects diff --git a/test/sql/extension_custom_scripts.sql b/test/sql/extension_custom_scripts.sql index 9885e92..ac98007 100644 --- a/test/sql/extension_custom_scripts.sql +++ b/test/sql/extension_custom_scripts.sql @@ -2,6 +2,14 @@ set role extensions_role; \echo -- per-extension custom scripts are run +drop extension if exists citext; +create extension autoinc; + +drop extension citext; +drop extension autoinc; +\echo + +-- per-extension custom scripts are run for extensions not in privileged_extensions create extension fuzzystrmatch; drop extension fuzzystrmatch; select * from t2;