blob: 87ee100c1051a6e598f5373f6d74e1b68d1f9c62 [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 Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "testsuite"
Victor Morales0f94b4a2017-09-01 18:42:40 -050013
Victor Moralesf1f1ba52017-11-20 16:38:28 -080014 asserts_file_exist $testsuite_src_folder/LICENSE.TXT
15 asserts_file_exist $testsuite_src_folder/heatbridge/pom.xml
16 asserts_file_exist $testsuite_src_folder/properties/LICENSE.TXT
17 asserts_file_exist $testsuite_src_folder/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 Moralesf1f1ba52017-11-20 16:38:28 -080022 clone_repos "testsuite"
23 compile_repos "testsuite"
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
29function 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
36function test_install_message_router {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080037 clone_repos "robot"
Victor Morales0f94b4a2017-09-01 18:42:40 -050038 get_robot_images
39 install_robot
40
41 asserts_image_running testsuite
42}
43
44if [ "$1" != '*' ]; then
45 unset covered_functions
46 covered_functions=$1
47fi
48main "${covered_functions[@]}"