Skip to content

Commit

Permalink
tests(dlp): normalize VPCSC configuration in systests (#9608)
Browse files Browse the repository at this point in the history
Toward #9580.
  • Loading branch information
tseaver authored Nov 11, 2019
1 parent ef309fc commit 3dab9f3
Show file tree
Hide file tree
Showing 2 changed files with 471 additions and 507 deletions.
18 changes: 2 additions & 16 deletions dlp/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,11 @@ def system(session):
session.install("-e", "../test_utils/")
session.install("-e", ".")

env = {}
# Additional setup for VPCSC system tests
if os.environ.get("GOOGLE_CLOUD_TESTS_IN_VPCSC", "false").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 3dab9f3

Please sign in to comment.