diff --git a/docker-compose.yml b/docker-compose.yml index 40d9bc5b..22495a95 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -304,7 +304,7 @@ services: environment: - AUR_CONFIG=conf/config.sqlite entrypoint: /docker/test-sqlite-entrypoint.sh - command: /docker/scripts/run-pytests.sh clean + command: setup-sqlite.sh run-pytests.sh clean stdin_open: true tty: true volumes: @@ -331,7 +331,7 @@ services: - AUR_CONFIG=conf/config - DB_HOST=mariadb entrypoint: /docker/tests-entrypoint.sh - command: /docker/scripts/run-tests.sh + command: setup-sqlite.sh run-tests.sh stdin_open: true tty: true depends_on: diff --git a/docker/scripts/setup-sqlite.sh b/docker/scripts/setup-sqlite.sh new file mode 100755 index 00000000..e0b8de50 --- /dev/null +++ b/docker/scripts/setup-sqlite.sh @@ -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 "$@"