[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] branch master updated: expand auditor test
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] branch master updated: expand auditor test |
Date: |
Thu, 22 Aug 2019 15:43:32 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 027f04a0 expand auditor test
027f04a0 is described below
commit 027f04a0f1d7ae9519cc900e5bc79b3a807d55dd
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Aug 22 15:43:30 2019 +0200
expand auditor test
---
src/auditor/test-auditor.sh | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index a493683e..ecd89c74 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -1,14 +1,28 @@
#!/bin/bash
+# Setup database which was generated from a perfectly normal
+# exchange-wallet interaction and run the auditor against it.
+#
+# Check that the auditor report is as expected.
+#
+# Requires 'jq' tool and Postgres superuser rights!
set -eu
DB=taler-auditor-test
-dropdb $DB || true
+dropdb $DB 2> /dev/null || true
createdb -T template0 $DB || exit 77
-psql $DB < ../benchmark/auditor-basedb.sql
+jq -h > /dev/null || exit 77
+psql $DB -q -1 -f ../benchmark/auditor-basedb.sql > /dev/null
MASTER_PUB=`cat ../benchmark/auditor-basedb.mpub`
taler-auditor -c test-auditor.conf -m $MASTER_PUB > test-audit.json
-# TODO: check test-audit.json matches expectations
+
+fail=0
+# if an emergency was detected, that is a bug and we should fail
+echo -n "Test for emergencies... "
+jq -e .emergencies < test-audit.json > /dev/null && (echo Failed; fail=1) ||
echo OK
+
+# TODO: Add more checks to ensure test-audit.json matches expectations
dropdb $DB
+exit $fail
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-exchange] branch master updated: expand auditor test,
gnunet <=