Skip to content

Commit 6410981

Browse files
committed
Failing system tests when credentials env. var is unset.
1 parent 92a20c6 commit 6410981

File tree

13 files changed

+41
-14
lines changed

13 files changed

+41
-14
lines changed

bigquery/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/',)
@@ -49,7 +50,8 @@ def system_tests(session, python_version):
4950

5051
# Sanity check: Only run system tests if the environment variable is set.
5152
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
52-
return
53+
raise nox.command.CommandFailed(
54+
reason='Credentials must be set via environment variable.')
5355

5456
# Run the system tests against latest Python 2 and Python 3 only.
5557
session.interpreter = 'python{}'.format(python_version)

bigtable/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import os
1717

1818
import nox
19+
import nox.command
1920

2021

2122
LOCAL_DEPS = ('../core/',)
@@ -48,7 +49,8 @@ def system_tests(session, python_version):
4849

4950
# Sanity check: Only run system tests if the environment variable is set.
5051
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
51-
return
52+
raise nox.command.CommandFailed(
53+
reason='Credentials must be set via environment variable.')
5254

5355
# Run the system tests against latest Python 2 and Python 3 only.
5456
session.interpreter = 'python{}'.format(python_version)

datastore/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/',)
@@ -49,7 +50,8 @@ def system_tests(session, python_version):
4950

5051
# Sanity check: Only run system tests if the environment variable is set.
5152
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
52-
return
53+
raise nox.command.CommandFailed(
54+
reason='Credentials must be set via environment variable.')
5355

5456
# Run the system tests against latest Python 2 and Python 3 only.
5557
session.interpreter = 'python{}'.format(python_version)

error_reporting/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/', '../logging/')
@@ -71,7 +72,8 @@ def system_tests(session, python_version):
7172

7273
# Sanity check: Only run system tests if the environment variable is set.
7374
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
74-
return
75+
raise nox.command.CommandFailed(
76+
reason='Credentials must be set via environment variable.')
7577

7678
# Run the system tests against latest Python 2 and Python 3 only.
7779
session.interpreter = 'python{}'.format(python_version)

language/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/',)
@@ -49,7 +50,8 @@ def system_tests(session, python_version):
4950

5051
# Sanity check: Only run system tests if the environment variable is set.
5152
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
52-
return
53+
raise nox.command.CommandFailed(
54+
reason='Credentials must be set via environment variable.')
5355

5456
# Run the system tests against latest Python 2 and Python 3 only.
5557
session.interpreter = 'python{}'.format(python_version)

logging/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/',)
@@ -52,7 +53,8 @@ def system_tests(session, python_version):
5253

5354
# Sanity check: Only run system tests if the environment variable is set.
5455
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
55-
return
56+
raise nox.command.CommandFailed(
57+
reason='Credentials must be set via environment variable.')
5658

5759
# Run the system tests against latest Python 2 and Python 3 only.
5860
session.interpreter = 'python{}'.format(python_version)

monitoring/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/',)
@@ -49,7 +50,8 @@ def system_tests(session, python_version):
4950

5051
# Sanity check: Only run system tests if the environment variable is set.
5152
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
52-
return
53+
raise nox.command.CommandFailed(
54+
reason='Credentials must be set via environment variable.')
5355

5456
# Run the system tests against latest Python 2 and Python 3 only.
5557
session.interpreter = 'python{}'.format(python_version)

pubsub/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/',)
@@ -49,7 +50,8 @@ def system_tests(session, python_version):
4950

5051
# Sanity check: Only run system tests if the environment variable is set.
5152
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
52-
return
53+
raise nox.command.CommandFailed(
54+
reason='Credentials must be set via environment variable.')
5355

5456
# Run the system tests against latest Python 2 and Python 3 only.
5557
session.interpreter = 'python{}'.format(python_version)

spanner/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/',)
@@ -49,7 +50,8 @@ def system_tests(session, python_version):
4950

5051
# Sanity check: Only run system tests if the environment variable is set.
5152
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
52-
return
53+
raise nox.command.CommandFailed(
54+
reason='Credentials must be set via environment variable.')
5355

5456
# Run the system tests against latest Python 2 and Python 3 only.
5557
session.interpreter = 'python{}'.format(python_version)

speech/nox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818

1919
import nox
20+
import nox.command
2021

2122

2223
LOCAL_DEPS = ('../core/',)
@@ -49,7 +50,8 @@ def system_tests(session, python_version):
4950

5051
# Sanity check: Only run system tests if the environment variable is set.
5152
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
52-
return
53+
raise nox.command.CommandFailed(
54+
reason='Credentials must be set via environment variable.')
5355

5456
# Run the system tests against latest Python 2 and Python 3 only.
5557
session.interpreter = 'python{}'.format(python_version)

0 commit comments

Comments
 (0)