Skip to content

Commit

Permalink
Failing system tests when credentials env. var is unset.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Jun 5, 2017
1 parent 92a20c6 commit 6410981
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 14 deletions.
4 changes: 3 additions & 1 deletion bigquery/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -49,7 +50,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion bigtable/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -48,7 +49,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion datastore/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -49,7 +50,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion error_reporting/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/', '../logging/')
Expand Down Expand Up @@ -71,7 +72,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion language/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -49,7 +50,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion logging/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -52,7 +53,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion monitoring/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -49,7 +50,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion pubsub/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -49,7 +50,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion spanner/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -49,7 +50,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion speech/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -49,7 +50,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion storage/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -50,7 +51,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
4 changes: 3 additions & 1 deletion translate/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


LOCAL_DEPS = ('../core/',)
Expand Down Expand Up @@ -49,7 +50,8 @@ 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
raise nox.command.CommandFailed(
reason='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)
Expand Down
7 changes: 5 additions & 2 deletions vision/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os

import nox
import nox.command


@nox.session
Expand Down Expand Up @@ -46,7 +47,8 @@ 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
raise nox.command.CommandFailed(
reason='Credentials must be set via environment variable.')

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)
Expand All @@ -67,7 +69,8 @@ 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
raise nox.command.CommandFailed(
reason='Credentials must be set via environment variable.')

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)
Expand Down

0 comments on commit 6410981

Please sign in to comment.