Skip to content

Commit 8135e1b

Browse files
committed
tests: enable system tests
1 parent 9312ff4 commit 8135e1b

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

.kokoro/system.sh

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ export PYTHONUNBUFFERED=1
2424
# Setup firestore account credentials
2525
export FIRESTORE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/firebase-credentials.json
2626

27-
# Setup service account credentials.
28-
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
29-
30-
# Setup project id.
31-
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
32-
3327
RETVAL=0
3428

3529
export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
@@ -72,6 +66,18 @@ for dir in `find 'packages' -type d -wholename 'packages/*/tests/system' -o -who
7266

7367
case "${package_name}" in
7468
"google-auth")
69+
# google-auth specific project id.
70+
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/google-auth-project-id.json")
71+
72+
# google-auth specific service account credentials.
73+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/google-auth-service-account.json
74+
75+
# google-auth specific system test noxfile
76+
export NOX_FILE="system_tests/noxfile.py"
77+
78+
# For google-auth, run all nox sessions for this file
79+
export NOX_SESSION=""
80+
7581
# Decrypt google-auth system test secrets
7682
# Create working directory if not exists. system_tests/data is not tracked by
7783
# Git to prevent the secrets from being leaked online.
@@ -85,14 +91,18 @@ for dir in `find 'packages' -type d -wholename 'packages/*/tests/system' -o -who
8591
--plaintext-file="${package_path}/system_tests/secrets.tar"
8692
tar xvf "${package_path}/system_tests/secrets.tar" -C "${package_path}/system_tests/"
8793
rm "${package_path}/system_tests/secrets.tar"
88-
export NOX_FILE="system_tests/noxfile.py"
89-
# Run all nox sessions for this file
90-
export NOX_SESSION=""
9194
;;
9295
*)
93-
# Fallback/Default
96+
# Fallback/Default project id.
97+
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
98+
99+
# Fallback/Default service account credentials.
100+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
101+
102+
# Fallback/Default noxfile.py
94103
export NOX_FILE="noxfile.py"
95-
# Run the system nox session
104+
105+
# Fallback/Default system nox session
96106
export NOX_SESSION="system-3.12"
97107
;;
98108
esac

0 commit comments

Comments
 (0)