aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDanny Hermes <daniel.j.hermes@gmail.com>2015-05-03 14:43:04 -0700
committerDanny Hermes <daniel.j.hermes@gmail.com>2015-05-03 14:44:00 -0700
commit381aac7ffa1df63c17b319b7547d3b84a26a5f40 (patch)
treeeb94344828989c1dfa760bafeaf2e943173c68ed /scripts
parent1929a8cd872279a5a0d9c6da83a9ec4b616b52f4 (diff)
downloadoauth2client-381aac7ffa1df63c17b319b7547d3b84a26a5f40.tar.gz
Final iteration to make system tests pass.
Two main things happened here: 1. Manually encrypted files instead of using `travis encrypt-file` 2. Removed OAUTH2CLIENT_TEST_USER_KEY_PATH fallback. The first was because `travis encrypt-file` was failing mysteriously. To make up, I ran openssl enc -d -a -md sha1 -aes-256-cbc -nosalt -p and typed random noise into the keyboard to create a candidate KEY and IV (H/T http://superuser.com/a/471524). After doing this, they were set via travis env set OAUTH2CLIENT_KEY "..KEY.." --repo "google/oauth2client" travis env set OAUTH2CLIENT_IV "..IV.." --repo "google/oauth2client" To actually do the encryption locally: openssl aes-256-cbc -K "..KEY.." \ -iv "..IV.." \ -in file-to-encrypt \ -out file-to-encrypt.enc -e As for the second change, OAUTH2CLIENT_TEST_USER_KEY_PATH was previously allowed to fallback to client._get_well_known_file() in system tests, but this is a problem since that function throws an OSError when the directory does not exist. (It does not exist on Travis.)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/run_system_tests.py3
-rwxr-xr-xscripts/run_system_tests.sh12
2 files changed, 7 insertions, 8 deletions
diff --git a/scripts/run_system_tests.py b/scripts/run_system_tests.py
index 6b90509..3f7baba 100644
--- a/scripts/run_system_tests.py
+++ b/scripts/run_system_tests.py
@@ -9,8 +9,7 @@ from oauth2client import service_account
JSON_KEY_PATH = os.getenv('OAUTH2CLIENT_TEST_JSON_KEY_PATH')
P12_KEY_PATH = os.getenv('OAUTH2CLIENT_TEST_P12_KEY_PATH')
P12_KEY_EMAIL = os.getenv('OAUTH2CLIENT_TEST_P12_KEY_EMAIL')
-USER_KEY_PATH = os.getenv('OAUTH2CLIENT_TEST_USER_KEY_PATH',
- client._get_well_known_file())
+USER_KEY_PATH = os.getenv('OAUTH2CLIENT_TEST_USER_KEY_PATH')
USER_KEY_EMAIL = os.getenv('OAUTH2CLIENT_TEST_USER_KEY_EMAIL')
SCOPE = ('https://www.googleapis.com/auth/plus.login',
diff --git a/scripts/run_system_tests.sh b/scripts/run_system_tests.sh
index 41fd8a2..7169eb7 100755
--- a/scripts/run_system_tests.sh
+++ b/scripts/run_system_tests.sh
@@ -24,18 +24,18 @@ if [[ "${TRAVIS}" == "true" ]]; then
[[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
echo "Running in Travis during merge, decrypting stored key file."
# Convert encrypted JSON key file into decrypted file to be used.
- openssl aes-256-cbc -K ${encrypted_f2d92020e83e_key} \
- -iv ${encrypted_f2d92020e83e_iv} \
+ openssl aes-256-cbc -K ${OAUTH2CLIENT_KEY} \
+ -iv ${OAUTH2CLIENT_IV} \
-in tests/data/key.json.enc \
-out ${OAUTH2CLIENT_TEST_JSON_KEY_PATH} -d
# Convert encrypted P12 key file into decrypted file to be used.
- openssl aes-256-cbc -K ${encrypted_f2d92020e83e_key} \
- -iv ${encrypted_f2d92020e83e_iv} \
+ openssl aes-256-cbc -K ${OAUTH2CLIENT_KEY} \
+ -iv ${OAUTH2CLIENT_IV} \
-in tests/data/key.p12.enc \
-out ${OAUTH2CLIENT_TEST_P12_KEY_PATH} -d
# Convert encrypted User JSON key file into decrypted file to be used.
- openssl aes-256-cbc -K ${encrypted_f2d92020e83e_key} \
- -iv ${encrypted_f2d92020e83e_iv} \
+ openssl aes-256-cbc -K ${OAUTH2CLIENT_KEY} \
+ -iv ${OAUTH2CLIENT_IV} \
-in tests/data/user-key.json.enc \
-out ${OAUTH2CLIENT_TEST_USER_KEY_PATH} -d
else