diff --git a/docker/scripts/run-pytests.sh b/docker/scripts/run-pytests.sh index ef8a2318..d992bf06 100755 --- a/docker/scripts/run-pytests.sh +++ b/docker/scripts/run-pytests.sh @@ -26,6 +26,11 @@ done python -m aurweb.initdb 2>/dev/null || \ (echo "Error: aurweb.initdb failed; already initialized?" && /bin/true) +# Run test_initdb ahead of time, which clears out the database, +# in case of previous failures which stopped the test suite before +# finishing the ends of some test fixtures. +eatmydata -- pytest test/test_initdb.py + # Run pytest with optional targets in front of it. eatmydata -- make -C test "${PARAMS[@]}" pytest