Updating system tests to succeed on Travis.

Adds files which have been encrypted by Travis and
decrypts those files in scripts/run_system_tests.sh using
a key and initialization vector (iv) provided by the Travis
environment for this project.
This commit is contained in:
Danny Hermes
2015-05-01 10:44:56 -07:00
parent 659869f19a
commit b65f2e11a9
6 changed files with 22 additions and 2 deletions

3
.gitignore vendored
View File

@@ -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

View File

@@ -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:

View File

@@ -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

BIN
tests/data/key.json.enc Normal file

Binary file not shown.

BIN
tests/data/key.p12.enc Normal file

Binary file not shown.

Binary file not shown.