blob: b96a08848197d738a3def595977e90e3c6c9a92a [file] [log] [blame]
Victor Morales0f94b4a2017-09-01 18:42:40 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/robot
5
6covered_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
11function test_clone_robot_repos {
Victor Morales5d21f642017-12-07 11:54:59 -080012 clone_repos "robot" "testsuite"
Victor Morales0f94b4a2017-09-01 18:42:40 -050013
Victor Morales54646642017-12-08 11:57:42 -080014 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 Morales0f94b4a2017-09-01 18:42:40 -050018}
19
20# test_compile_robot_repos() - Verify that Robot source code can be compiled properly
21function test_compile_robot_repos {
Victor Morales5d21f642017-12-07 11:54:59 -080022 clone_repos "robot" "testsuite"
23 compile_repos "robot"
Victor Morales0f94b4a2017-09-01 18:42:40 -050024
Victor Moralesf1f1ba52017-11-20 16:38:28 -080025 #asserts_file_exist $testsuite_src_folder/heatbridge/target/maven-python/dist/heatbridge-0.3.0.dev0-py2-none-any.whl
Victor Morales0f94b4a2017-09-01 18:42:40 -050026}
27
28# test_get_robot_images() - Verify that Robot Docker images are retrieved
Victor Morales5d21f642017-12-07 11:54:59 -080029function test_get_robot_images {
Victor Morales0f94b4a2017-09-01 18:42:40 -050030 get_robot_images
31
Victor Morales5d21f642017-12-07 11:54:59 -080032 asserts_image $nexus_docker_repo/openecomp/testsuite
Victor Morales0f94b4a2017-09-01 18:42:40 -050033}
34
35# test_install_robot() - Verify the built and start of Robot services
Victor Morales5d21f642017-12-07 11:54:59 -080036function test_install_robot {
37 clone_repos "robot" "testsuite"
Victor Morales0f94b4a2017-09-01 18:42:40 -050038 get_robot_images
39 install_robot
40
Victor Morales5d21f642017-12-07 11:54:59 -080041 asserts_image_running $nexus_docker_repo/openecomp/testsuite
Victor Morales0f94b4a2017-09-01 18:42:40 -050042}
43
44if [ "$1" != '*' ]; then
45 unset covered_functions
46 covered_functions=$1
47fi
48main "${covered_functions[@]}"