bigchaindb/.ci/travis_script.sh
Krish f35f01f1cb Add SSL support for MongoDB connections (#1510)
* Add SSL support for MongoDB connections

* Tests for TLS connectivity and other fixes

* Add test for ssl parameters

* Add test for AuthenticationError

* Cleanup branch

* Split env vars as per @r-marques suggestion

* Remove SSL_ENABLED and use BIGCHAINDB_DATABASE_SSL instead

* Changes as per comments from @r-marques

* Remove redundant tests

* Test for ConfigurationError
2017-06-13 12:04:34 +02:00

18 lines
613 B
Bash
Executable File

#!/bin/bash
set -e -x
if [[ -n ${TOXENV} ]]; then
tox -e ${TOXENV}
elif [[ "${BIGCHAINDB_DATABASE_BACKEND}" == mongodb && \
"${BIGCHAINDB_DATABASE_SSL}" == false ]]; then
# Run the full suite of tests for MongoDB over an unsecure connection
pytest -sv --database-backend=mongodb --cov=bigchaindb
elif [[ "${BIGCHAINDB_DATABASE_BACKEND}" == mongodb && \
"${BIGCHAINDB_DATABASE_SSL}" == true ]]; then
# Run a sub-set of tests over SSL; those marked as 'pytest.mark.bdb_ssl'.
pytest -sv --database-backend=mongodb-ssl --cov=bigchaindb -m bdb_ssl
else
pytest -sv -n auto --cov=bigchaindb
fi