diff --git a/.testr.conf b/.testr.conf index 30108f0b0..bb49f15d4 100644 --- a/.testr.conf +++ b/.testr.conf @@ -3,7 +3,7 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ./mistral/tests $LISTOPT $IDOPTION + ${PYTHON:-python} -m subunit.run discover -t ./ ./mistral/tests/unit $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/functionaltests/post_test_hook.sh b/functionaltests/post_test_hook.sh index d510cfaaa..8a8f9c500 100755 --- a/functionaltests/post_test_hook.sh +++ b/functionaltests/post_test_hook.sh @@ -27,8 +27,6 @@ if [[ "$ZUUL_PROJECT" == "stackforge/mistral" ]]; then echo "Run mistral API tests" sudo bash ./functionaltests/run_tests.sh RETVAL=$? - # Copy tempest log files to be published among other logs upon job completion - sudo cp /opt/stack/new/mistral/functionaltests/tempest.log /opt/stack/logs fi #Run client tests for both repositories: mistral and python-mistralclient @@ -39,7 +37,4 @@ if [[ RETVAL -eq 0 ]]; then RETVAL=$? fi -# Copy tempest log files to be published among other logs upon job completion -sudo cp /opt/stack/new/python-mistralclient/functionaltests/tempest.log /opt/stack/logs/tempest_client.log - exit $RETVAL diff --git a/functionaltests/run_tests.sh b/functionaltests/run_tests.sh index 32cc071e5..36d775a2c 100755 --- a/functionaltests/run_tests.sh +++ b/functionaltests/run_tests.sh @@ -31,9 +31,6 @@ MISTRALCLIENT_DIR=/opt/stack/new/python-mistralclient # Define PYTHONPATH export PYTHONPATH=$PYTHONPATH:$TEMPEST_DIR -export PYTHONPATH=$PYTHONPATH:$MISTRAL_DIR -export PYTHONPATH=$PYTHONPATH:$MISTRALCLIENT_DIR -echo $PYTHONPATH pwd -nosetests -sv functionaltests +nosetests -sv mistral/tests/functional/ diff --git a/functionaltests/__init__.py b/mistral/tests/functional/__init__.py similarity index 100% rename from functionaltests/__init__.py rename to mistral/tests/functional/__init__.py diff --git a/functionaltests/api/__init__.py b/mistral/tests/functional/api/__init__.py similarity index 100% rename from functionaltests/api/__init__.py rename to mistral/tests/functional/api/__init__.py diff --git a/functionaltests/api/base.py b/mistral/tests/functional/api/base.py similarity index 100% rename from functionaltests/api/base.py rename to mistral/tests/functional/api/base.py diff --git a/functionaltests/api/v1/__init__.py b/mistral/tests/functional/api/v1/__init__.py similarity index 100% rename from functionaltests/api/v1/__init__.py rename to mistral/tests/functional/api/v1/__init__.py diff --git a/functionaltests/api/v1/demo.yaml b/mistral/tests/functional/api/v1/demo.yaml similarity index 100% rename from functionaltests/api/v1/demo.yaml rename to mistral/tests/functional/api/v1/demo.yaml diff --git a/functionaltests/api/v1/test_mistral_basic.py b/mistral/tests/functional/api/v1/test_mistral_basic.py similarity index 99% rename from functionaltests/api/v1/test_mistral_basic.py rename to mistral/tests/functional/api/v1/test_mistral_basic.py index 91b22fe2b..8784a507a 100644 --- a/functionaltests/api/v1/test_mistral_basic.py +++ b/mistral/tests/functional/api/v1/test_mistral_basic.py @@ -1,5 +1,3 @@ - - # Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -20,7 +18,7 @@ import uuid from tempest import exceptions from tempest import test -from functionaltests.api import base +from mistral.tests.functional.api import base class SanityTests(base.TestCase): diff --git a/run_tests.sh b/run_tests.sh index c34ecf429..0abfc7fce 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -110,7 +110,7 @@ function run_tests { if [ "$testropts" = "" ] && [ "$testrargs" = "" ]; then # Default to running all tests if specific test is not # provided. - testrargs="discover ./mistral/tests" + testrargs="discover ./mistral/tests/unit" fi ${wrapper} python -m testtools.run $testropts $testrargs