blob: 702401e2a84e9cab272d5356f0b82bbee7528227 [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 {
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
21function 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
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 {
37 clone_robot_repos
38 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[@]}"