mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-23 22:29:58 +00:00
## Problem The regression test on extensions relied on the admin API to set the default endpoint settings, which is not stable and requires admin privileges. Specifically: - The workflow was using `default_endpoint_settings` to configure necessary PostgreSQL settings like `DateStyle`, `TimeZone`, and `neon.allow_unstable_extensions` - This approach was failing because the API endpoint for setting `default_endpoint_settings` was changed (referenced in a comment as issue #27108) - The admin API requires special privileges. ## Summary of changes We get rid of the admin API dependency and use ALTER DATABASE statements instead: **Removed the default_endpoint_settings mechanism:** - Removed the default_endpoint_settings input parameter from the neon-project-create action - Removed the API call that was attempting to set these settings at the project level - Completely removed the default_endpoint_settings configuration from the cloud-extensions workflow **Added database-level settings:** - Created a new `alter_db.sh` script that applies the same settings directly to each test database - Modified all extension test scripts to call this script after database creation
25 lines
812 B
Bash
Executable File
25 lines
812 B
Bash
Executable File
#!/bin/bash
|
|
set -ex
|
|
cd "$(dirname "${0}")"
|
|
PGXS="$(dirname "$(pg_config --pgxs)" )"
|
|
REGRESS="${PGXS}/../test/regress/pg_regress"
|
|
TESTDIR="test"
|
|
TESTS=$(ls "${TESTDIR}/sql" | sort )
|
|
TESTS=${TESTS//\.sql/}
|
|
TESTS=${TESTS/empty_mutations/}
|
|
TESTS=${TESTS/function_return_row_is_selectable/}
|
|
TESTS=${TESTS/issue_300/}
|
|
TESTS=${TESTS/permissions_connection_column/}
|
|
TESTS=${TESTS/permissions_functions/}
|
|
TESTS=${TESTS/permissions_node_column/}
|
|
TESTS=${TESTS/permissions_table_level/}
|
|
TESTS=${TESTS/permissions_types/}
|
|
TESTS=${TESTS/row_level_security/}
|
|
TESTS=${TESTS/sqli_connection/}
|
|
dropdb --if-exist contrib_regression
|
|
createdb contrib_regression
|
|
. ../alter_db.sh
|
|
psql -v ON_ERROR_STOP=1 -f test/fixtures.sql -d contrib_regression
|
|
${REGRESS} --use-existing --dbname=contrib_regression --inputdir=${TESTDIR} ${TESTS}
|
|
|