diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-09-13 13:00:02 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-09-13 13:00:02 +0200 |
commit | bca7f21fdd6b37e68a13155857e666b3f1f811a2 (patch) | |
tree | 85733a8759fc3d4839f6e18fb189e007391f7f32 /src/auditor/test-revocation.sh | |
parent | fed7102ad5e24382c1ceed089e92498098084075 (diff) | |
download | exchange-bca7f21fdd6b37e68a13155857e666b3f1f811a2.tar.gz exchange-bca7f21fdd6b37e68a13155857e666b3f1f811a2.tar.bz2 exchange-bca7f21fdd6b37e68a13155857e666b3f1f811a2.zip |
-work on auditor tests
Diffstat (limited to 'src/auditor/test-revocation.sh')
-rwxr-xr-x | src/auditor/test-revocation.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/auditor/test-revocation.sh b/src/auditor/test-revocation.sh index 2809b8ea1..4fa26f3e0 100755 --- a/src/auditor/test-revocation.sh +++ b/src/auditor/test-revocation.sh @@ -600,16 +600,16 @@ echo "Testing for taler-wallet-cli" taler-wallet-cli -h >/dev/null </dev/null 2>/dev/null || exit_skip "taler-wallet-cli required" echo -n "Testing for Postgres" -HAVE_INITDB=`find /usr -name "initdb" | grep postgres` || exit_skip " MISSING" -echo " FOUND" +HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres 2> /dev/null` || exit_skip " MISSING" +echo " FOUND at" `dirname $HAVE_INITDB` echo -n "Setting up Postgres DB" -INITDB_BIN=`find /usr -name "initdb" | grep bin/initdb | grep postgres | sort -n | tail -n1` -POSTGRES_PATH=`basename $INITDB_BIN` +INITDB_BIN=`echo $HAVE_INITDB | grep bin/initdb | grep postgres | sort -n | tail -n1 2> /dev/null` +POSTGRES_PATH=`dirname $INITDB_BIN` TMPDIR=`mktemp -d /tmp/taler-test-postgresXXXXXX` $INITDB_BIN --no-sync --auth=trust -D ${TMPDIR} > postgres-dbinit.log 2> postgres-dbinit.err echo " DONE" mkdir ${TMPDIR}/sockets -echo -n "Launching Postgres service" +echo -n "Launching Postgres service at $POSTGRES_PATH" cat - >> $TMPDIR/postgresql.conf <<EOF unix_socket_directories='${TMPDIR}/sockets' fsync=off @@ -623,7 +623,9 @@ mv $TMPDIR/pg_hba.conf.new $TMPDIR/pg_hba.conf ${POSTGRES_PATH}/pg_ctl -D $TMPDIR -l /dev/null start > postgres-start.log 2> postgres-start.err echo " DONE" PGHOST="$TMPDIR/sockets" -EXPORT PGHOST="@POSTGRES_SOCKET" +export PGHOST + +bash MYDIR=`mktemp -d /tmp/taler-auditor-basedbXXXXXX` |