Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/robot |
| 5 | |
| 6 | covered_functions=( |
| 7 | "clone_robot_repos" "compile_robot_repos" "get_robot_images" "install_robot" |
| 8 | ) |
| 9 | |
| 10 | # test_clone_robot_repos() - Verify that Robot repositories are cloned properly |
| 11 | function test_clone_robot_repos { |
| 12 | clone_robot_repos |
| 13 | |
| 14 | asserts_file_exist $robot_src_folder/LICENSE.TXT |
| 15 | asserts_file_exist $robot_src_folder/heatbridge/pom.xml |
| 16 | asserts_file_exist $robot_src_folder/properties/LICENSE.TXT |
| 17 | asserts_file_exist $robot_src_folder/python-testing-utils/LICENSE.TXT |
| 18 | } |
| 19 | |
| 20 | # test_compile_robot_repos() - Verify that Robot source code can be compiled properly |
| 21 | function test_compile_robot_repos { |
| 22 | clone_robot_repos |
| 23 | compile_robot_repos |
| 24 | |
| 25 | asserts_file_exist $robot_src_folder/heatbridge/target/maven-python/dist/heatbridge-0.3.0.dev0-py2-none-any.whl |
| 26 | } |
| 27 | |
| 28 | # test_get_robot_images() - Verify that Robot Docker images are retrieved |
| 29 | function test_get_mr_images { |
| 30 | get_robot_images |
| 31 | |
| 32 | asserts_image testsuite |
| 33 | } |
| 34 | |
| 35 | # test_install_robot() - Verify the built and start of Robot services |
| 36 | function test_install_message_router { |
| 37 | clone_robot_repos |
| 38 | get_robot_images |
| 39 | install_robot |
| 40 | |
| 41 | asserts_image_running testsuite |
| 42 | } |
| 43 | |
| 44 | if [ "$1" != '*' ]; then |
| 45 | unset covered_functions |
| 46 | covered_functions=$1 |
| 47 | fi |
| 48 | main "${covered_functions[@]}" |