blob: 731d005a384ed64ffde246beabbc63db15ee0bb3 [file] [log] [blame]
Victor Morales7ba76472017-08-23 15:19:36 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/vid
5
6covered_functions=(
7"clone_all_vid_repos" "compile_all_vid_repos" "get_vid_images" "install_vid"
8)
9
10# test_clone_all_vid_repos() - Verifies that VID repositories are retrieved properly
11function test_clone_all_vid_repos {
12 clone_all_vid_repos
13
14 asserts_file_exist $vid_src_folder/pom.xml
15 asserts_file_exist $vid_src_folder/asdcclient/pom.xml
16}
17
18# test_compile_all_vid_repos() - Verifies that VID source code is compiled properly
19function test_compile_all_vid_repos {
20 clone_all_vid_repos
21 compile_all_vid_repos
22
23 asserts_file_exist $vid_src_folder/asdcclient/target/asdcclient-1.0.2-SNAPSHOT.jar
24 asserts_file_exist $vid_src_folder/epsdk-app-onap/target/vid.war
25 asserts_file_exist $vid_src_folder/vid-app-common/target/vid-common.war
26}
27
28# test_get_vid_images() - Verifies that VID Docker images are built properly
29function test_get_vid_images {
30 clone_all_vid_repos
31 get_vid_images
32
33 asserts_image openecomp/vid
34 asserts_image mariadb:10
35}
36
37# test_install_vid() - Verifies taht VID services are up and running
38function test_install_vid {
39 clone_all_vid_repos
40 get_vid_images
41 install_vid
42
43 vid_image=`docker images | grep vid | grep latest| awk '{print $1 ":" $2}'`
44 asserts_image_running $vid_image
45}
46
47if [ "$1" != '*' ]; then
48 unset covered_functions
49 covered_functions=$1
50fi
51main "${covered_functions[@]}"