Skip to content

Commit

Permalink
tests(nox): skip testing with postgres if required info is not provided
Browse files Browse the repository at this point in the history
All values but "password" have a default for postgres. Skip testing if password isn't provided.
  • Loading branch information
bruno-fs committed Jun 26, 2024
1 parent a2f049d commit 13ef6e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def tests(session: Session, database: str) -> None:

if database == "postgresql":
session.install("psycopg2")
if not os.getenv("POSTGRESQL_PASSWORD"):
session.skip("no postgresql password provided. skipping...")
for setting in ["name", "user", "password", "host", "port"]:
value = os.getenv(f"postgresql_{setting}".upper())
if value:
Expand Down

0 comments on commit 13ef6e5

Please sign in to comment.