Update integration test to use Pytest (#3703)
* Refactor int test to use pytest * Add comments to int test script
This commit is contained in:
parent
613b1395b8
commit
d3ad9d6686
6 changed files with 301 additions and 279 deletions
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
# Runs a test to verify whether each service has the correct dependencies listed in setup.py
|
||||
#
|
||||
# Tests that depend on multiple services are assumed to be located in dedicated testfiles (and ignored during this test)
|
||||
# (test_*_integration.py/test_*_cloudformation.py)
|
||||
#
|
||||
# ::Algorithm::
|
||||
# For each valid service:
|
||||
# - Create a virtual environment
|
||||
|
|
@ -48,13 +51,14 @@ test_service() {
|
|||
# Can't just install requirements-file, as it points to all dependencies
|
||||
pip install -r requirements-tests.txt > /dev/null
|
||||
pip install .[$service] > /dev/null 2>&1
|
||||
pip install boto > /dev/null 2>&1
|
||||
# Restart venv - ensure these deps are loaded
|
||||
deactivate
|
||||
source ${venv_path}/bin/activate > /dev/null
|
||||
# Run tests for this service
|
||||
test_result_filename="test_results_${service}.log"
|
||||
touch $test_result_filename
|
||||
nosetests -qxs --ignore-files="test_server\.py" --ignore-files="test_${service}_cloudformation\.py" --ignore-files="test_integration\.py" $path_to_test_file >$test_result_filename 2>&1
|
||||
pytest -sv --ignore-glob="**/test_server.py" --ignore-glob="**/test_*_cloudformation.py" --ignore-glob="**/test_*_integration.py" $path_to_test_file >$test_result_filename 2>&1
|
||||
RESULT=$?
|
||||
if [[ $RESULT != 0 ]]; then
|
||||
echo -e "Tests for ${service} have failed!\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue