From 71e10c1a6fe541dd0b39bb4d390888fa9f5ec17d Mon Sep 17 00:00:00 2001 From: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> Date: Tue, 2 Mar 2021 12:17:31 -0800 Subject: [PATCH] test: install pyopenssl for mtls testing (#29) --- packages/google-cloud-compute/noxfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-cloud-compute/noxfile.py b/packages/google-cloud-compute/noxfile.py index 6ee8c4519a41..0ad24c69cae6 100644 --- a/packages/google-cloud-compute/noxfile.py +++ b/packages/google-cloud-compute/noxfile.py @@ -123,6 +123,9 @@ def system(session): # Sanity 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") + # Install pyopenssl for mTLS testing. + if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true": + session.install("pyopenssl") system_test_exists = os.path.exists(system_test_path) system_test_folder_exists = os.path.exists(system_test_folder_path)