Skip to content

Commit

Permalink
fix: Improve test error message for missing credentials (#1024)
Browse files Browse the repository at this point in the history
* Improve test error message for missing credentials

See relevant issue #1023

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Andrew Gorcester <gorcester@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 28, 2023
1 parent aa4f282 commit 892481a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def system(session):
session.skip("RUN_SYSTEM_TESTS is set to false, skipping")
# Environment check: Only run tests if the environment variable is set.
if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
session.skip("Credentials must be set via environment variable")
session.skip(
"Credentials must be set via environment variable GOOGLE_APPLICATION_CREDENTIALS"
)
# mTLS tests requires pyopenssl.
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") == "true":
session.install("pyopenssl")
Expand Down

0 comments on commit 892481a

Please sign in to comment.