aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/test-auditor.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-07-20 02:15:58 +0200
committerChristian Grothoff <christian@grothoff.org>2023-07-20 02:15:58 +0200
commit59e057b93e65c73dc3cd57dcced563847d85ba77 (patch)
tree84677266a32fc0ff25d51f694e9de83aaa55106e /src/auditor/test-auditor.sh
parent50c0cc489d9a9a2a82b643ae09eb78af9e599db6 (diff)
-misc fixes
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-xsrc/auditor/test-auditor.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index a3992f79..fb350a79 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -472,7 +472,7 @@ function run_audit () {
# Do a full reload of the (original) database
function full_reload()
{
- echo -n "Doing full reload of the database ($BASEDB - $DB)... "
+ echo -n "Doing full reload of the database (loading ${BASEDB}.sql into $DB at $PGHOST)... "
dropdb "$DB" 2> /dev/null || true
createdb -T template0 "$DB" \
|| exit_skip "could not create database $DB (at $PGHOST)"
@@ -2341,19 +2341,15 @@ echo " DONE"
PGHOST="$TMPDIR/sockets"
export PGHOST
-# FIXME: here for testing, avoids generation skip.
-# Should probably introduce getopt to make this
-# possible via CLI.
-check_with_database "bar/${DB}"
-
-
-exit 0
-
MYDIR="${MY_TMP_DIR}/basedb"
mkdir -p "${MYDIR}"
echo "Generating fresh database at $MYDIR"
if faketime -f '-1 d' ./generate-auditor-basedb.sh "$MYDIR/$DB"
then
+ echo -n "Reset 'auditor-basedb' database at $PGHOST ..."
+ dropdb "auditor-basedb" >/dev/null 2>/dev/null || true
+ createdb "auditor-basedb" || exit_skip "Could not create database '$BASEDB' at $PGHOST"
+ echo " DONE"
check_with_database "$MYDIR/$DB"
if [ "$fail" != "0" ]
then