Skip to content

Commit 12542c7

Browse files
committed
tests: refactor system tests
1 parent 30c916f commit 12542c7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.kokoro/system.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ run_package_test() {
5656
NOX_FILE="system_tests/noxfile.py"
5757
NOX_SESSION=""
5858

59+
# Activate gcloud for this specific package
60+
gcloud auth activate-service-account --key-file="$GOOGLE_APPLICATION_CREDENTIALS"
61+
gcloud config set project "$PROJECT_ID"
62+
5963
# Decrypt secrets
6064
mkdir -p "${package_path}/system_tests/data"
6165
gcloud kms decrypt \
@@ -70,16 +74,16 @@ run_package_test() {
7074
GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_GFILE_DIR}/service-account.json"
7175
NOX_FILE="noxfile.py"
7276
NOX_SESSION="system-3.12"
77+
78+
# Activate gcloud for this specific package
79+
gcloud auth activate-service-account --key-file="$GOOGLE_APPLICATION_CREDENTIALS"
80+
gcloud config set project "$PROJECT_ID"
7381
;;
7482
esac
7583

76-
# Export variables only for the duration of this function's sub-processes
84+
# Export variables for the duration of this function's sub-processes
7785
export PROJECT_ID GOOGLE_APPLICATION_CREDENTIALS NOX_FILE NOX_SESSION
7886

79-
# Activate gcloud for this specific package
80-
gcloud auth activate-service-account --key-file="$GOOGLE_APPLICATION_CREDENTIALS"
81-
gcloud config set project "$PROJECT_ID"
82-
8387
# Run the actual test
8488
pushd "${package_path}" > /dev/null
8589
set +e

0 commit comments

Comments
 (0)