summaryrefslogtreecommitdiff
path: root/src/auditor
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-09-24 00:16:51 +0200
committerChristian Grothoff <christian@grothoff.org>2022-09-24 00:16:51 +0200
commit035e052c39923ce9017ffc76a1baef054606a08d (patch)
treecabd99a60852e7d63401044b25cf1cb0fa323572 /src/auditor
parentf05a3450e0bfd7a2c0f6a2f1eb1d12cb1c6e5c5d (diff)
downloadexchange-035e052c39923ce9017ffc76a1baef054606a08d.tar.gz
exchange-035e052c39923ce9017ffc76a1baef054606a08d.tar.bz2
exchange-035e052c39923ce9017ffc76a1baef054606a08d.zip
-fix test-revocation
Diffstat (limited to 'src/auditor')
-rwxr-xr-xsrc/auditor/generate-auditor-basedb.sh2
-rwxr-xr-xsrc/auditor/generate-revoke-basedb.sh9
-rwxr-xr-xsrc/auditor/test-auditor.sh6
3 files changed, 10 insertions, 7 deletions
diff --git a/src/auditor/generate-auditor-basedb.sh b/src/auditor/generate-auditor-basedb.sh
index 0c52a06c4..7c68acf48 100755
--- a/src/auditor/generate-auditor-basedb.sh
+++ b/src/auditor/generate-auditor-basedb.sh
@@ -14,7 +14,7 @@
# and be allowed to create/drop databases.
#
set -eu
-# set -x
+#set -x
function get_iban() {
export LIBEUFIN_SANDBOX_USERNAME=$1
diff --git a/src/auditor/generate-revoke-basedb.sh b/src/auditor/generate-revoke-basedb.sh
index f262b4960..4188f0517 100755
--- a/src/auditor/generate-revoke-basedb.sh
+++ b/src/auditor/generate-revoke-basedb.sh
@@ -591,16 +591,19 @@ exit_cleanup
echo "Dumping database"
echo "Dumping PostgreSQL database: ${BASEDB}.sql"
pg_dump -O $TARGET_DB | sed -e '/AS integer/d' > ${BASEDB}.sql
-echo "Dumping libeufin database: ${BASEDB}-libeufin.sql"
+echo "Dumping libeufin database: ${TARGET_DB}-libeufin-*.sql"
+cd $MY_TMP_DIR
sqlite3 ${TARGET_DB}-nexus.sqlite3 ".dump" > ${BASEDB}-libeufin-nexus.sql
sqlite3 ${TARGET_DB}-sandbox.sqlite3 ".dump" > ${BASEDB}-libeufin-sandbox.sql
+rm ${TARGET_DB}-sandbox.sqlite3 ${TARGET_DB}-nexus.sqlite3 # libeufin DB
+
+cd $ORIGIN
+
echo $MASTER_PUB > ${BASEDB}.mpub
-# clean up
echo "Final clean up"
dropdb $TARGET_DB
-rm ${TARGET_DB}-sandbox.sqlite3 ${TARGET_DB}-nexus.sqlite3 # libeufin DB
echo "====================================="
echo " Finished generation of $BASEDB "
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index b77f14223..c9895b6f3 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# This file is part of TALER
-# Copyright (C) 2014-2021 Taler Systems SA
+# Copyright (C) 2014-2022 Taler Systems SA
#
# TALER is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
@@ -1207,7 +1207,7 @@ function test_16() {
echo PASS
stop_libeufin
- echo "Second modification: wire nothing"
+ echo "Second modification: wire nothing"
NEW_AMOUNT="TESTKUDOS:0"
echo "UPDATE TalerRequestedPayments SET amount='${NEW_AMOUNT}' WHERE id='1';" | sqlite3 ${MYDIR}/${DB}-nexus.sqlite3
launch_libeufin
@@ -2028,7 +2028,7 @@ function check_with_database()
# ####### Setup globals ######
# Postgres database to use
-DB=auditor-basedb
+export DB=auditor-basedb
# test required commands exist
echo "Testing for jq"