pass wire fees to aggregator in test case
This commit is contained in:
parent
ecfc8ace55
commit
cc5297a7f1
src/auditor
@ -12,6 +12,9 @@ TALER_BANK_AUTH_METHOD = basic
|
|||||||
USERNAME = Exchange
|
USERNAME = Exchange
|
||||||
PASSWORD = x
|
PASSWORD = x
|
||||||
|
|
||||||
|
[exchangedb]
|
||||||
|
WIREFEE_BASE_DIR = ${PWD}/wirefees/
|
||||||
|
|
||||||
[auditordb-postgres]
|
[auditordb-postgres]
|
||||||
CONFIG = postgres:///taler-auditor-test
|
CONFIG = postgres:///taler-auditor-test
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ function exit_fail() {
|
|||||||
function run_audit () {
|
function run_audit () {
|
||||||
# Launch bank
|
# Launch bank
|
||||||
echo -n "Launching bank "
|
echo -n "Launching bank "
|
||||||
taler-bank-manage -c test-auditor.conf serve-http 2>bank.err >bank.log &
|
taler-bank-manage -c $CONF serve-http 2>bank.err >bank.log &
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
echo -n "."
|
echo -n "."
|
||||||
@ -55,15 +55,15 @@ function run_audit () {
|
|||||||
if test ${1:-no} = "aggregator"
|
if test ${1:-no} = "aggregator"
|
||||||
then
|
then
|
||||||
echo -n "Running exchange aggregator ..."
|
echo -n "Running exchange aggregator ..."
|
||||||
taler-exchange-aggregator -t -c test-auditor.conf
|
taler-exchange-aggregator -t -c $CONF 2> aggregator.log
|
||||||
echo " DONE"
|
echo " DONE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the auditor!
|
# Run the auditor!
|
||||||
echo -n "Running audit(s) ..."
|
echo -n "Running audit(s) ..."
|
||||||
taler-auditor -r -c test-auditor.conf -m $MASTER_PUB > test-audit.json 2> test-audit.log || exit_fail "auditor failed"
|
taler-auditor -r -c $CONF -m $MASTER_PUB > test-audit.json 2> test-audit.log || exit_fail "auditor failed"
|
||||||
|
|
||||||
taler-wire-auditor -r -c test-auditor.conf -m $MASTER_PUB > test-wire-audit.json 2> test-wire-audit.log || exit_fail "wire auditor failed"
|
taler-wire-auditor -r -c $CONF -m $MASTER_PUB > test-wire-audit.json 2> test-wire-audit.log || exit_fail "wire auditor failed"
|
||||||
echo " DONE"
|
echo " DONE"
|
||||||
|
|
||||||
kill `jobs -p` || true
|
kill `jobs -p` || true
|
||||||
@ -83,7 +83,7 @@ full_reload()
|
|||||||
dropdb $DB 2> /dev/null || true
|
dropdb $DB 2> /dev/null || true
|
||||||
createdb -T template0 $DB || exit_skip "could not create database"
|
createdb -T template0 $DB || exit_skip "could not create database"
|
||||||
# Import pre-generated database, -q(ietly) using single (-1) transaction
|
# Import pre-generated database, -q(ietly) using single (-1) transaction
|
||||||
psql -Aqt $DB -q -1 -f ../benchmark/auditor-basedb.sql > /dev/null
|
psql -Aqt $DB -q -1 -f ${BASEDB}.sql > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -726,9 +726,20 @@ echo "DONE"
|
|||||||
|
|
||||||
# *************** Main logic starts here **************
|
# *************** Main logic starts here **************
|
||||||
|
|
||||||
# Setup globals
|
# ####### Setup globals ######
|
||||||
|
# Postgres database to use
|
||||||
DB=taler-auditor-test
|
DB=taler-auditor-test
|
||||||
MASTER_PUB=`cat ../benchmark/auditor-basedb.mpub`
|
# Prefix for the data resources to use
|
||||||
|
BASEDB="../benchmark/auditor-basedb"
|
||||||
|
MASTER_PUB=`cat ${BASEDB}.mpub`
|
||||||
|
# Configuration file to use
|
||||||
|
CONF=test-auditor.conf
|
||||||
|
|
||||||
|
# Where to store wire fee details for aggregator
|
||||||
|
WIRE_FEE_DIR=`taler-config -c $CONF -f -s exchangedb -o WIREFEE_BASE_DIR`
|
||||||
|
mkdir -p $WIRE_FEE_DIR
|
||||||
|
cp ${BASEDB}.fees $WIRE_FEE_DIR/x-taler-bank.fee
|
||||||
|
|
||||||
|
|
||||||
# test required commands exist
|
# test required commands exist
|
||||||
echo "Testing for jq"
|
echo "Testing for jq"
|
||||||
@ -754,8 +765,9 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
echo "Cleanup"
|
echo "Cleanup (disabled)"
|
||||||
# dropdb $DB
|
# dropdb $DB
|
||||||
|
# rm -r $WIRE_FEE_DIR
|
||||||
# rm -f test-audit.log test-wire-audit.log
|
# rm -f test-audit.log test-wire-audit.log
|
||||||
|
|
||||||
exit $fail
|
exit $fail
|
||||||
|
Loading…
Reference in New Issue
Block a user