nix(loadtest): remove outdated PGRST_DB_URI default
This was required for v9 and earlier, but these don't build with the current nix invocation anymore anyway. Even loadtesting against v10 does not work, because `--version` is used in one of the wait scripts and this was only added in v11.2. So no need to pretend we'd support comparing against older versions.
This commit is contained in:
@@ -53,13 +53,10 @@ let
|
|||||||
workingDir = "/";
|
workingDir = "/";
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
# previously required settings to make this work with older branches
|
|
||||||
export PGRST_DB_ANON_ROLE="postgrest_test_anonymous"
|
export PGRST_DB_ANON_ROLE="postgrest_test_anonymous"
|
||||||
export PGRST_DB_URI="postgresql://"
|
|
||||||
export PGRST_DB_SCHEMAS="test"
|
|
||||||
|
|
||||||
export PGRST_DB_CONFIG="false"
|
export PGRST_DB_CONFIG="false"
|
||||||
export PGRST_DB_POOL="1"
|
export PGRST_DB_POOL="1"
|
||||||
|
export PGRST_DB_SCHEMAS="test"
|
||||||
export PGRST_DB_TX_END="rollback-allow-override"
|
export PGRST_DB_TX_END="rollback-allow-override"
|
||||||
export PGRST_LOG_LEVEL="crit"
|
export PGRST_LOG_LEVEL="crit"
|
||||||
export PGRST_JWT_SECRET="reallyreallyreallyreallyverysafe"
|
export PGRST_JWT_SECRET="reallyreallyreallyreallyverysafe"
|
||||||
|
|||||||
+2
-14
@@ -236,18 +236,6 @@ let
|
|||||||
${git}/bin/git worktree remove -f "$tmpdir" > /dev/null
|
${git}/bin/git worktree remove -f "$tmpdir" > /dev/null
|
||||||
'';
|
'';
|
||||||
|
|
||||||
legacyConfig =
|
|
||||||
writeText "legacy.conf"
|
|
||||||
''
|
|
||||||
# Using this config file to support older postgrest versions for `postgrest-loadtest-against`
|
|
||||||
db-uri="$(PGRST_DB_URI)"
|
|
||||||
db-schema="$(PGRST_DB_SCHEMAS)"
|
|
||||||
db-anon-role="$(PGRST_DB_ANON_ROLE)"
|
|
||||||
db-pool="$(PGRST_DB_POOL)"
|
|
||||||
server-unix-socket="$(PGRST_SERVER_UNIX_SOCKET)"
|
|
||||||
log-level="$(PGRST_LOG_LEVEL)"
|
|
||||||
'';
|
|
||||||
|
|
||||||
waitForPgrstReady =
|
waitForPgrstReady =
|
||||||
checkedShellScript
|
checkedShellScript
|
||||||
{
|
{
|
||||||
@@ -334,11 +322,11 @@ let
|
|||||||
printf "done in %ss.\n" "$build_end"
|
printf "done in %ss.\n" "$build_end"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ver=$($PGRST_CMD ${legacyConfig} --version)
|
ver=$($PGRST_CMD --version)
|
||||||
|
|
||||||
echo -n "${commandName}: Starting $ver... "
|
echo -n "${commandName}: Starting $ver... "
|
||||||
|
|
||||||
$PGRST_CMD ${legacyConfig} > "$tmpdir"/run.log 2>&1 &
|
$PGRST_CMD > "$tmpdir"/run.log 2>&1 &
|
||||||
pid=$!
|
pid=$!
|
||||||
# shellcheck disable=SC2329
|
# shellcheck disable=SC2329
|
||||||
cleanup() {
|
cleanup() {
|
||||||
|
|||||||
Reference in New Issue
Block a user