diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-03-23 14:01:04 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-03-23 14:01:04 +0100 |
commit | 78e568ea0cd3b1e9cf26852ed3a80e0283a7cc1f (patch) | |
tree | 0565c839b59cc55f879ccea8c9e34d907687aefc /src/auditor/test-auditor.sh | |
parent | 921d4efd4c94e6398a142c6910a7da4c770480ba (diff) | |
download | exchange-78e568ea0cd3b1e9cf26852ed3a80e0283a7cc1f.tar.gz exchange-78e568ea0cd3b1e9cf26852ed3a80e0283a7cc1f.tar.bz2 exchange-78e568ea0cd3b1e9cf26852ed3a80e0283a7cc1f.zip |
fix configuration files of test-auditor
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-x | src/auditor/test-auditor.sh | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh index 65e77b04d..4c8389b99 100755 --- a/src/auditor/test-auditor.sh +++ b/src/auditor/test-auditor.sh @@ -2228,7 +2228,9 @@ INITDB_BIN=$(command -v initdb) || true if [[ -n "$INITDB_BIN" ]]; then echo " FOUND (in path) at $INITDB_BIN" else - HAVE_INITDB=$(find /usr -name "initdb" | head -1 2> /dev/null | grep postgres) \ + HAVE_INITDB=$(find /usr -name "initdb" 2> /dev/null \ + | head -1 2> /dev/null \ + | grep postgres) \ || exit_skip " MISSING" echo " FOUND at $(dirname "$HAVE_INITDB")" INITDB_BIN=$(echo "$HAVE_INITDB" | grep bin/initdb | grep postgres | sort -n | tail -n1) @@ -2244,37 +2246,37 @@ $INITDB_BIN \ --no-sync \ --auth=trust \ -D "${TMPDIR}" \ + --set listen_addresses='' \ + --set fsync=off \ + --set max_wal_senders=0 \ + --set synchronous_commit=off \ + --set wal_level=minimal \ + --set unix_socket_directories="${TMPDIR}/sockets" \ > "${MY_TMP_DIR}/postgres-dbinit.log" \ 2> "${MY_TMP_DIR}/postgres-dbinit.err" echo "DONE" SOCKETDIR="${TMPDIR}/sockets" mkdir "${SOCKETDIR}" + echo -n "Launching Postgres service" -cat - >> "$TMPDIR/postgresql.conf" <<EOF -unix_socket_directories='${TMPDIR}/sockets' -fsync=off -max_wal_senders=0 -synchronous_commit=off -wal_level=minimal -listen_addresses='' -EOF +# Unix domain socket is NOT yet supported by libeufin! grep -v host \ < "$TMPDIR/pg_hba.conf" \ > "$TMPDIR/pg_hba.conf.new" mv "$TMPDIR/pg_hba.conf.new" "$TMPDIR/pg_hba.conf" "${POSTGRES_PATH}/pg_ctl" \ -D "$TMPDIR" \ - -l /dev/null \ + -l "${MY_TMP_DIR}/postgres.log" \ start \ > "${MY_TMP_DIR}/postgres-start.log" \ 2> "${MY_TMP_DIR}/postgres-start.err" echo " DONE" PGHOST="$TMPDIR/sockets" export PGHOST - MYDIR="${MY_TMP_DIR}/basedb" mkdir -p "${MYDIR}" echo "Generating fresh database at $MYDIR" + if faketime -f '-1 d' ./generate-auditor-basedb.sh -d "$MYDIR/$DB" then echo -n "Reset 'auditor-basedb' database at $PGHOST ..." |