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 { |
Victor Morales | 5d21f64 | 2017-12-07 11:54:59 -0800 | [diff] [blame] | 12 | clone_repos "robot" "testsuite" |
Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 13 | |
Victor Morales | 5464664 | 2017-12-08 11:57:42 -0800 | [diff] [blame] | 14 | asserts_file_exist ${src_folders[robot]}/LICENSE.TXT |
| 15 | asserts_file_exist ${src_folders[robot]}/heatbridge/pom.xml |
| 16 | asserts_file_exist ${src_folders[robot]}/properties/LICENSE.TXT |
| 17 | asserts_file_exist ${src_folders[robot]}/python-testing-utils/LICENSE.TXT |
Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | # test_compile_robot_repos() - Verify that Robot source code can be compiled properly |
| 21 | function test_compile_robot_repos { |
Victor Morales | 5d21f64 | 2017-12-07 11:54:59 -0800 | [diff] [blame] | 22 | clone_repos "robot" "testsuite" |
| 23 | compile_repos "robot" |
Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 24 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 25 | #asserts_file_exist $testsuite_src_folder/heatbridge/target/maven-python/dist/heatbridge-0.3.0.dev0-py2-none-any.whl |
Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | # test_get_robot_images() - Verify that Robot Docker images are retrieved |
Victor Morales | 5d21f64 | 2017-12-07 11:54:59 -0800 | [diff] [blame] | 29 | function test_get_robot_images { |
Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 30 | get_robot_images |
| 31 | |
Victor Morales | 5d21f64 | 2017-12-07 11:54:59 -0800 | [diff] [blame] | 32 | asserts_image $nexus_docker_repo/openecomp/testsuite |
Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | # test_install_robot() - Verify the built and start of Robot services |
Victor Morales | 5d21f64 | 2017-12-07 11:54:59 -0800 | [diff] [blame] | 36 | function test_install_robot { |
| 37 | clone_repos "robot" "testsuite" |
Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 38 | get_robot_images |
| 39 | install_robot |
| 40 | |
Victor Morales | 5d21f64 | 2017-12-07 11:54:59 -0800 | [diff] [blame] | 41 | asserts_image_running $nexus_docker_repo/openecomp/testsuite |
Victor Morales | 0f94b4a | 2017-09-01 18:42:40 -0500 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | if [ "$1" != '*' ]; then |
| 45 | unset covered_functions |
| 46 | covered_functions=$1 |
| 47 | fi |
| 48 | main "${covered_functions[@]}" |