Skip to content

Commit

Permalink
Merge pull request #402 from KNMI/fix-psql-clean-for-tests
Browse files Browse the repository at this point in the history
Only clean psql db when using psql
  • Loading branch information
mgrunbauer authored Sep 3, 2024
2 parents e974744 + b4d0483 commit e1458a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lib/adaguc/AdagucTestTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def cleanPostgres(self):
Some tests fail when using postgres if there is already data present in the database.
Running the test separately works."""

if adaguc_db := os.getenv("ADAGUC_DB", None):
adaguc_db = os.getenv("ADAGUC_DB", None)
if adaguc_db and not adaguc_db.endswith(".db"):
subprocess.run(
[
"psql",
Expand Down

0 comments on commit e1458a0

Please sign in to comment.