Docker: add scripts/setup-sqlite.sh

This script purely removes any existing sqlite and is
used before tests are run. This causes the test flow
to run `aurweb.initdb` again (if ever).

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-06-29 21:35:00 -07:00
parent f4406ccf5c
commit 3f60f5048e
2 changed files with 9 additions and 2 deletions

7
docker/scripts/setup-sqlite.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
# Run an sqlite test. This script really just prepares sqlite
# tests by deleting any existing databases so the test can
# initialize cleanly.
DB_NAME="$(grep 'name =' conf/config.sqlite | sed -r 's/^name = (.+)$/\1/')"
rm -vf $DB_NAME
exec "$@"