-fix test-sync
This commit is contained in:
parent
1081f3edbf
commit
47ab7c4c41
@ -103,7 +103,7 @@ MASTER_PRIV_DIR=`dirname $MASTER_PRIV_FILE`
|
||||
taler-config -f -c ${CONF_ONCE} -s exchange-offline -o MASTER_PRIV_FILE -V ${MASTER_PRIV_FILE}
|
||||
rm -f "${MASTER_PRIV_FILE}"
|
||||
mkdir -p $MASTER_PRIV_DIR
|
||||
gnunet-ecc -g1 $MASTER_PRIV_FILE > /dev/null
|
||||
gnunet-ecc -l/dev/null -g1 $MASTER_PRIV_FILE > /dev/null
|
||||
MASTER_PUB=`gnunet-ecc -p $MASTER_PRIV_FILE`
|
||||
MERCHANT_PORT=`taler-config -c $CONF_ONCE -s MERCHANT -o PORT`
|
||||
MERCHANT_URL=http://localhost:${MERCHANT_PORT}/
|
||||
@ -112,7 +112,7 @@ AUDITOR_PRIV_FILE=$1.apriv
|
||||
AUDITOR_PRIV_DIR=`dirname $AUDITOR_PRIV_FILE`
|
||||
taler-config -f -c ${CONF_ONCE} -s auditor -o AUDITOR_PRIV_FILE -V ${AUDITOR_PRIV_FILE}
|
||||
mkdir -p $AUDITOR_PRIV_DIR
|
||||
gnunet-ecc -g1 $AUDITOR_PRIV_FILE > /dev/null
|
||||
gnunet-ecc -l/dev/null -g1 $AUDITOR_PRIV_FILE > /dev/null
|
||||
AUDITOR_PUB=`gnunet-ecc -p $AUDITOR_PRIV_FILE`
|
||||
EXCHANGE_URL=`taler-config -c $CONF_ONCE -s EXCHANGE -o BASE_URL`
|
||||
BANK_PORT=`taler-config -c $CONF_ONCE -s BANK -o HTTP_PORT`
|
||||
|
@ -66,7 +66,7 @@ function cleanup()
|
||||
{
|
||||
if test ! -z ${EPID:-}
|
||||
then
|
||||
echo -n "Stopping exchange..."
|
||||
echo -n "Stopping exchange $EPID..."
|
||||
kill -TERM $EPID
|
||||
wait $EPID
|
||||
echo " DONE"
|
||||
@ -96,12 +96,12 @@ function exit_cleanup()
|
||||
echo "Stopping Postgres at ${POSTGRES_PATH}"
|
||||
${POSTGRES_PATH}/pg_ctl -D $TMPDIR -l /dev/null stop &> /dev/null || true
|
||||
fi
|
||||
cleanup
|
||||
for n in `jobs -p`
|
||||
do
|
||||
kill $n 2> /dev/null || true
|
||||
done
|
||||
wait
|
||||
cleanup
|
||||
echo "DONE"
|
||||
}
|
||||
|
||||
@ -282,6 +282,7 @@ function run_audit () {
|
||||
2> taler-exchange-offline-drain.log || exit_fail "offline draining failed"
|
||||
kill -TERM $EPID
|
||||
wait $EPID
|
||||
unset EPID
|
||||
echo -n "Running taler-exchange-drain ..."
|
||||
echo "\n" | taler-exchange-drain -L DEBUG -c $CONF 2> taler-exchange-drain.log || exit_fail "FAIL"
|
||||
echo " DONE"
|
||||
@ -1531,7 +1532,7 @@ function test_24() {
|
||||
|
||||
echo "===========24: deposits missing ==========="
|
||||
# Modify denom_sig, so it is wrong
|
||||
CNT=`echo "SELECT COUNT(*) FROM exchange.deposit_confirmations;" | psql -Aqt $DB`
|
||||
CNT=`echo "SELECT COUNT(*) FROM auditor.deposit_confirmations;" | psql -Aqt $DB`
|
||||
if test x$CNT = x0
|
||||
then
|
||||
echo "Skipping deposits missing test: no deposit confirmations in database!"
|
||||
|
@ -625,9 +625,6 @@ echo " DONE"
|
||||
PGHOST="$TMPDIR/sockets"
|
||||
export PGHOST
|
||||
|
||||
bash
|
||||
|
||||
|
||||
MYDIR=`mktemp -d /tmp/taler-auditor-basedbXXXXXX`
|
||||
echo "Generating fresh database at $MYDIR"
|
||||
if faketime -f '-1 d' ./generate-revoke-basedb.sh $MYDIR/revoke-basedb
|
||||
|
@ -85,6 +85,7 @@ function check_with_database()
|
||||
dropdb talercheck-out
|
||||
|
||||
echo "PASS"
|
||||
fail=0
|
||||
}
|
||||
|
||||
|
||||
@ -108,11 +109,11 @@ 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` || 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`
|
||||
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"
|
||||
@ -131,15 +132,13 @@ 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
|
||||
|
||||
MYDIR=`mktemp -d /tmp/taler-auditor-basedbXXXXXX`
|
||||
echo "Generating fresh database at $MYDIR"
|
||||
if faketime -f '-1 d' ./generate-auditor-basedb.sh $MYDIR/basedb
|
||||
if faketime -f '-1 d' ./generate-auditor-basedb.sh $MYDIR/auditor-basedb
|
||||
then
|
||||
check_with_database $MYDIR/basedb
|
||||
check_with_database $MYDIR/auditor-basedb
|
||||
if test x$fail != x0
|
||||
then
|
||||
exit $fail
|
||||
|
Loading…
Reference in New Issue
Block a user