From 262f55a62e7de9a82c05e3314f5e44a15e163b96 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Thu, 29 Jun 2017 10:56:09 -0700 Subject: [PATCH] Skipping system tests when credentials env. var is unset. (#3475) --- .circleci/config.yml | 2 +- appveyor/requirements.txt | 2 +- bigquery/nox.py | 2 +- bigtable/nox.py | 2 +- datastore/nox.py | 4 ++-- error_reporting/nox.py | 2 +- language/nox.py | 2 +- logging/nox.py | 2 +- monitoring/nox.py | 2 +- pubsub/nox.py | 2 +- spanner/nox.py | 2 +- speech/nox.py | 2 +- storage/nox.py | 2 +- translate/nox.py | 2 +- vision/nox.py | 4 ++-- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01242a41d15b8..7e481f97d1dcc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: build: docker: - - image: googleapis/nox:0.11.2 + - image: googleapis/nox:0.17.0 steps: - checkout - run: diff --git a/appveyor/requirements.txt b/appveyor/requirements.txt index 24cc58840e728..45a4e4c256274 100644 --- a/appveyor/requirements.txt +++ b/appveyor/requirements.txt @@ -3,4 +3,4 @@ # pip will build them from source using the MSVC compiler matching the # target Python version and architecture wheel -nox-automation==0.11.2 +nox-automation>=0.17.0 diff --git a/bigquery/nox.py b/bigquery/nox.py index a0211fba9b3d3..9851f53d188df 100644 --- a/bigquery/nox.py +++ b/bigquery/nox.py @@ -49,7 +49,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/bigtable/nox.py b/bigtable/nox.py index 611de0bc93386..40d997acc88b1 100644 --- a/bigtable/nox.py +++ b/bigtable/nox.py @@ -48,7 +48,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/datastore/nox.py b/datastore/nox.py index 5171bf0bb0120..983152e7db922 100644 --- a/datastore/nox.py +++ b/datastore/nox.py @@ -49,7 +49,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) @@ -70,7 +70,7 @@ def doctests(session): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Doctests run against Python 3.6 only. # It is difficult to make doctests run against both Python 2 and Python 3 diff --git a/error_reporting/nox.py b/error_reporting/nox.py index db245cfd74e85..08edc6987ab92 100644 --- a/error_reporting/nox.py +++ b/error_reporting/nox.py @@ -78,7 +78,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/language/nox.py b/language/nox.py index 569bcb925fac2..485ee930d7fb2 100644 --- a/language/nox.py +++ b/language/nox.py @@ -49,7 +49,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/logging/nox.py b/logging/nox.py index 9a9eb10ef3d3a..1d9d5f184e435 100644 --- a/logging/nox.py +++ b/logging/nox.py @@ -52,7 +52,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/monitoring/nox.py b/monitoring/nox.py index b4271686aa5af..dcde9c484b0ab 100644 --- a/monitoring/nox.py +++ b/monitoring/nox.py @@ -49,7 +49,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/pubsub/nox.py b/pubsub/nox.py index acd70b44ce0bc..dd7b093305242 100644 --- a/pubsub/nox.py +++ b/pubsub/nox.py @@ -49,7 +49,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/spanner/nox.py b/spanner/nox.py index 5c81a7d4c6717..7332af05f0e9c 100644 --- a/spanner/nox.py +++ b/spanner/nox.py @@ -49,7 +49,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/speech/nox.py b/speech/nox.py index 57c0cc4f7e069..bcacf2d59cd63 100644 --- a/speech/nox.py +++ b/speech/nox.py @@ -49,7 +49,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/storage/nox.py b/storage/nox.py index 171050be8be1d..f50de86bfdfaa 100644 --- a/storage/nox.py +++ b/storage/nox.py @@ -50,7 +50,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/translate/nox.py b/translate/nox.py index f59a2825ed9b0..3d006f1f0e27f 100644 --- a/translate/nox.py +++ b/translate/nox.py @@ -49,7 +49,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run the system tests against latest Python 2 and Python 3 only. session.interpreter = 'python{}'.format(python_version) diff --git a/vision/nox.py b/vision/nox.py index d5d3f3412ef75..8761fa6fccd6f 100644 --- a/vision/nox.py +++ b/vision/nox.py @@ -46,7 +46,7 @@ def system_tests(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run unit tests against all supported versions of Python. session.interpreter = 'python{}'.format(python_version) @@ -67,7 +67,7 @@ def system_tests_manual_layer(session, python_version): # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - return + session.skip('Credentials must be set via environment variable.') # Run unit tests against all supported versions of Python. session.interpreter = 'python{}'.format(python_version)