summaryrefslogtreecommitdiff
path: root/src/auditor/generate-revoke-basedb.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-26 18:58:42 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-26 18:58:42 +0100
commit8fa6b996ed70bc4079b1b4f6b34bcda58a4094bd (patch)
tree084b51f258574e798f0f9d62ed8e999c41c7c6bf /src/auditor/generate-revoke-basedb.sh
parent28c00bedbf2a936d6b888169d06130bd27a0caaf (diff)
downloadexchange-8fa6b996ed70bc4079b1b4f6b34bcda58a4094bd.tar.gz
exchange-8fa6b996ed70bc4079b1b4f6b34bcda58a4094bd.tar.bz2
exchange-8fa6b996ed70bc4079b1b4f6b34bcda58a4094bd.zip
generating revocation test DB
Diffstat (limited to 'src/auditor/generate-revoke-basedb.sh')
-rwxr-xr-xsrc/auditor/generate-revoke-basedb.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/auditor/generate-revoke-basedb.sh b/src/auditor/generate-revoke-basedb.sh
index e0e28f15f..654d9a53a 100755
--- a/src/auditor/generate-revoke-basedb.sh
+++ b/src/auditor/generate-revoke-basedb.sh
@@ -94,6 +94,7 @@ taler-bank-manage-testing $CONF postgres:///$TARGET_DB serve-http &> revocation-
taler-exchange-httpd -c $CONF 2> taler-exchange-httpd.log &
EXCHANGE_PID=$!
taler-merchant-httpd -c $CONF -L INFO 2> taler-merchant-httpd.log &
+MERCHANT_PID=$!
taler-exchange-wirewatch -c $CONF 2> taler-exchange-wirewatch.log &
taler-auditor-httpd -c $CONF 2> taler-auditor-httpd.log &
@@ -246,15 +247,26 @@ taler-wallet-cli $TIMETRAVEL --wallet-db=$WALLET_DB advanced suspend-coins "$sus
taler-wallet-cli $TIMETRAVEL --wallet-db=$WALLET_DB exchanges update \
-f $EXCHANGE_URL
-# FIXME: wallet is broken...
echo "Before Wallet CABOOM (type exit, note that you will have to terminate the wallet with CTRL-C)"
-bash
# Block until scheduled operations are done
taler-wallet-cli $TIMETRAVEL --wallet-db=$WALLET_DB run-until-done &> wallet-caboom.log
-bash
-# FIXME: check commands work from here...
+echo "Restarting merchant (so new keys are known)"
+kill -TERM $MERCHANT_PID
+taler-merchant-httpd -c $CONF -L INFO 2> taler-merchant-httpd.log &
+MERCHANT_PID=$!
+# Wait for merchant to be again available
+for n in `seq 1 50`
+do
+ echo -n "."
+ sleep 0.1
+ OK=0
+ # merchant
+ wget http://localhost:9966/ -o /dev/null -O /dev/null >/dev/null || continue
+ OK=1
+ break
+done
# Now we buy something, only the coins resulting from recoup+refresh will be
# used, as other ones are suspended