Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(dlp): normalize VPCSC configuration in systests #9608

Merged
merged 5 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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