Skip to content

Commit 119b90c

Browse files
author
Jon Wayne Parrott
authored
Fix system tests (googleapis#713)
Update user key to fix system tests
1 parent efe567a commit 119b90c

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

scripts/run_system_tests.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ set -ev
1919

2020
# If we're on Travis, we need to set up the environment.
2121
if [[ "${TRAVIS}" == "true" ]]; then
22-
# If merging to master and not a pull request, run system test.
23-
if [[ "${TRAVIS_BRANCH}" == "master" ]] && \
24-
[[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
25-
echo "Running in Travis during merge, decrypting stored key file."
22+
# If secure variables are available, run system test.
23+
if [[ "${TRAVIS_SECURE_ENV_VARS}" ]]; then
24+
echo "Running in Travis, decrypting stored key file."
2625
# Convert encrypted JSON key file into decrypted file to be used.
2726
openssl aes-256-cbc -K ${OAUTH2CLIENT_KEY} \
2827
-iv ${OAUTH2CLIENT_IV} \
@@ -34,8 +33,8 @@ if [[ "${TRAVIS}" == "true" ]]; then
3433
-in tests/data/key.p12.enc \
3534
-out ${OAUTH2CLIENT_TEST_P12_KEY_PATH} -d
3635
# Convert encrypted User JSON key file into decrypted file to be used.
37-
openssl aes-256-cbc -K ${OAUTH2CLIENT_KEY} \
38-
-iv ${OAUTH2CLIENT_IV} \
36+
openssl aes-256-cbc -K ${encrypted_1ee98544e5ca_key} \
37+
-iv ${encrypted_1ee98544e5ca_iv} \
3938
-in tests/data/user-key.json.enc \
4039
-out ${OAUTH2CLIENT_TEST_USER_KEY_PATH} -d
4140
else

tests/data/user-key.json.enc

16 Bytes
Binary file not shown.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ deps =
7171
pycrypto>=2.6
7272
cryptography>=1.0
7373
pyopenssl>=0.14
74-
passenv = GOOGLE_* OAUTH2CLIENT_* TRAVIS*
74+
passenv = GOOGLE_* OAUTH2CLIENT_* TRAVIS* encrypted_*
7575

7676
[testenv:system-tests3]
7777
basepython =

0 commit comments

Comments
 (0)