diff --git a/.gitignore b/.gitignore index f3a1806..5a9cac1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ nosetests.xml # Files with private / local data scripts/local_test_setup +tests/data/key.json +tests/data/key.p12 +tests/data/user-key.json diff --git a/.travis.yml b/.travis.yml index b61f595..815ac8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ env: - TOX_ENV=py34 - TOX_ENV=pypy - TOX_ENV=docs + - TOX_ENV=system-tests + - TOX_ENV=system-tests3 install: - pip install tox script: diff --git a/scripts/run_system_tests.sh b/scripts/run_system_tests.sh index c4b978f..82f4937 100755 --- a/scripts/run_system_tests.sh +++ b/scripts/run_system_tests.sh @@ -22,8 +22,23 @@ if [[ "${TRAVIS}" == "true" ]]; then # If merging to master and not a pull request, run system test. if [[ "${TRAVIS_BRANCH}" == "master" ]] && \ [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then - echo "Running in Travis during merge, not setup correctly yet." - exit 1 + 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_a1b222e8c14d_key} \ + -iv ${encrypted_a1b222e8c14d_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_a1b222e8c14d_key} \ + -iv ${encrypted_a1b222e8c14d_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_a1b222e8c14d_key} \ + -iv ${encrypted_a1b222e8c14d_iv} \ + -in tests/data/user-key.json.enc \ + -out ${OAUTH2CLIENT_TEST_USER_KEY_PATH} -d else echo "Running in Travis during non-merge to master, doing nothing." exit diff --git a/tests/data/key.json.enc b/tests/data/key.json.enc new file mode 100644 index 0000000..83dbbf4 Binary files /dev/null and b/tests/data/key.json.enc differ diff --git a/tests/data/key.p12.enc b/tests/data/key.p12.enc new file mode 100644 index 0000000..dc23e08 Binary files /dev/null and b/tests/data/key.p12.enc differ diff --git a/tests/data/user-key.json.enc b/tests/data/user-key.json.enc new file mode 100644 index 0000000..f3933af Binary files /dev/null and b/tests/data/user-key.json.enc differ