Skip to content

Commit

Permalink
tests(monitoring): normalize VPCSC configuration in systests (#9615)
Browse files Browse the repository at this point in the history
Toward #9580.
  • Loading branch information
tseaver authored Nov 12, 2019
1 parent d17f295 commit 505d553
Show file tree
Hide file tree
Showing 2 changed files with 640 additions and 627 deletions.
14 changes: 2 additions & 12 deletions monitoring/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,11 @@ def system(session):
session.install("-e", "../test_utils/")
session.install("-e", ".")

# Additional setup for VPCSC system tests
in_vpc = os.environ.get("GOOGLE_CLOUD_TESTS_IN_VPCSC", "false")
if in_vpc.lower() != "true":
# Unset PROJECT_ID, since VPCSC system tests expect this to be a project
# within the VPCSC perimeter.
env = {
"PROJECT_ID": "",
"GOOGLE_CLOUD_TESTS_VPCSC_OUTSIDE_PERIMETER_PROJECT": os.environ.get("PROJECT_ID"),
}

# Run py.test against the system tests.
if system_test_exists:
session.run("py.test", "--quiet", system_test_path, env=env, *session.posargs)
session.run("py.test", "--quiet", system_test_path, *session.posargs)
if system_test_folder_exists:
session.run("py.test", "--quiet", system_test_folder_path, env=env, *session.posargs)
session.run("py.test", "--quiet", system_test_folder_path, *session.posargs)


@nox.session(python="3.7")
Expand Down
Loading

0 comments on commit 505d553

Please sign in to comment.