Workflow Service for OpenStack.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run_functional_tests.sh 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #! /usr/bin/env bash
  2. ARG=$1
  3. function pre_hook() {
  4. export WITHOUT_AUTH="True"
  5. IS_TEMPEST=$(pip freeze | grep tempest)
  6. if [ -z "$IS_TEMPEST" ]
  7. then echo "$(tput setaf 4)No such module 'tempest' in the system. Before running this script please install 'tempest' module using : pip install git+http://github.com/openstack/tempest.git$(tput sgr 0)"
  8. exit 1
  9. fi
  10. }
  11. function run_tests_by_version() {
  12. echo "$(tput setaf 4)Running integration API and workflow execution tests for v$1$(tput sgr 0)"
  13. export VERSION="v$1"
  14. nosetests -v mistral_tempest_tests/tests/api/v$1/
  15. unset VERSION
  16. }
  17. function run_tests() {
  18. if [ -z "$ARG" ]
  19. then
  20. run_tests_by_version 1
  21. run_tests_by_version 2
  22. elif [ "$ARG" == "v1" ]
  23. then
  24. run_tests_by_version 1
  25. elif [ "$ARG" == "v2" ]
  26. then
  27. run_tests_by_version 2
  28. fi
  29. }
  30. function post_hook () {
  31. unset LOCAL_RUN
  32. }
  33. #----------main-part----------
  34. echo "$(tput setaf 4)Preparation for tests running...$(tput sgr 0)"
  35. pre_hook
  36. echo "$(tput setaf 4)Running tests...$(tput sgr 0)"
  37. run_tests
  38. post_hook