This repository was archived by the owner on Mar 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Format: //devtools/kokoro/config/proto/build.proto
2+
3+ # Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
4+ gfile_resources: " /bigstore/cloud-devrel-kokoro-resources/trampoline"
5+
6+ # All builds use the trampoline script to run in docker.
7+ build_file: " google-auth-library-python/.kokoro/trampoline.sh"
8+
9+ # Use the Python worker docker iamge.
10+ env_vars: {
11+ key: " TRAMPOLINE_IMAGE"
12+ value: " gcr.io/silver-python2/python-worker"
13+ }
Original file line number Diff line number Diff line change 1+ # Format: //devtools/kokoro/config/proto/build.proto
2+
3+ # Download secrets from Cloud Storage.
4+ gfile_resources: " /bigstore/cloud-devrel-kokoro-resources/google-auth-library-python"
5+
6+ # Tell the trampoline which build file to use.
7+ env_vars: {
8+ key: " TRAMPOLINE_BUILD_FILE"
9+ value: " github/google-auth-library-python/.kokoro/system_tests.sh"
10+ }
11+
12+ # Tell the system tests which Google Cloud project to use.
13+ env_vars: {
14+ key: " TEST_PROJECT"
15+ value: " python-docs-samples-tests"
16+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Copyright 2017 Google Inc.
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+ set -eo pipefail
18+
19+ export PATH=${PATH} :${HOME} /gcloud/google-cloud-sdk/bin
20+
21+ cd github/google-auth-library-python
22+
23+ # Unencrypt and extract secrets
24+ SECRETS_PASSWORD=$( cat " ${KOKORO_GFILE_DIR} /secrets-password.txt" )
25+ ./scripts/decrypt-secrets.sh " ${SECRETS_PASSWORD} "
26+
27+ # Setup gcloud, this is needed for the App Engine system test.
28+ gcloud auth activate-service-account --key-file system_tests/data/service_account.json
29+ gcloud config set project " ${TEST_PROJECT} "
30+
31+ # Run tests
32+ tox -e py27-system
33+ tox -e py36-system
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Copyright 2017 Google Inc.
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+ python3 " ${KOKORO_GFILE_DIR} /trampoline_v1.py"
Original file line number Diff line number Diff line change 1717import google .auth
1818from google .auth import _helpers
1919from google .auth import compute_engine
20+ from google .auth import exceptions
2021from google .auth .compute_engine import _metadata
2122
2223
2324@pytest .fixture (autouse = True )
2425def check_gce_environment (http_request ):
25- if not _metadata .ping (http_request , timeout = 1 ):
26+ try :
27+ _metadata .get_service_account_info (http_request )
28+ except exceptions .TransportError :
2629 pytest .skip ('Compute Engine metadata service is not available.' )
2730
2831
You can’t perform that action at this time.
0 commit comments