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:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
BIN
tests/data/key.json.enc
Normal file
Binary file not shown.
BIN
tests/data/key.p12.enc
Normal file
BIN
tests/data/key.p12.enc
Normal file
Binary file not shown.
BIN
tests/data/user-key.json.enc
Normal file
BIN
tests/data/user-key.json.enc
Normal file
Binary file not shown.
Reference in New Issue
Block a user