blob: 53d9c0d5e09f7f0cbe6d05c7304d50922d473c97 [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/vfc
5
6covered_functions=(
Victor Morales26855702017-09-26 07:57:11 -07007"clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc" "get_vfc_images"
Victor Moralesdd074802017-07-26 16:06:35 -05008)
9
10# test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories
11function test_clone_all_vfc_repos {
Victor Morales8b8e7392017-09-25 22:13:26 -070012 clone_all_vfc_repos
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070013
Victor Morales8b8e7392017-09-25 22:13:26 -070014 #asserts_file_exist $vfc_src_folder/pom.xml
15 #asserts_file_exist $vfc_src_folder/gvnfm
16 asserts_file_exist $vfc_src_folder/gvnfm/vnflcm/pom.xml
17 asserts_file_exist $vfc_src_folder/gvnfm/vnfmgr/pom.xml
18 asserts_file_exist $vfc_src_folder/gvnfm/vnfres/pom.xml
19 #asserts_file_exist $vfc_src_folder/nfvo
20 asserts_file_exist $vfc_src_folder/nfvo/catalog/run.sh
21 #asserts_file_exist $vfc_src_folder/nfvo/driver
22 asserts_file_exist $vfc_src_folder/nfvo/driver/ems/pom.xml
23 asserts_file_exist $vfc_src_folder/nfvo/driver/sfc/pom.xml
24 #asserts_file_exist $vfc_src_folder/nfvo/driver/vnfm
25 asserts_file_exist $vfc_src_folder/nfvo/driver/vnfm/gvnfm/pom.xml
26 asserts_file_exist $vfc_src_folder/nfvo/driver/vnfm/svnfm/pom.xml
27 asserts_file_exist $vfc_src_folder/nfvo/lcm/pom.xml
28 asserts_file_exist $vfc_src_folder/nfvo/wfengine/wso2/pom.xml
Victor Moralesdd074802017-07-26 16:06:35 -050029}
30
Victor Morales94b3e972017-08-17 14:55:55 -050031# test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly
32function test_compile_all_vfc_repos {
33 clone_all_vfc_repos
34 compile_all_vfc_repos
35
36 # TODO(electrocucaracha): Add asserts_file_exist
37}
38
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070039# test_get_vfc_images() - Verify all VFC images are built correctly.
40function test_get_vfc_images {
Victor Morales8b8e7392017-09-25 22:13:26 -070041 clone_all_vfc_repos
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070042 get_vfc_images
43
Victor Morales8b8e7392017-09-25 22:13:26 -070044 asserts_image onap/gvnfmdriver
45 asserts_image onap/nslcm
46 asserts_image onap/vnfres
47 asserts_image onap/vnfmgr
48 asserts_image onap/vnflcm
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070049}
50
Victor Morales94b3e972017-08-17 14:55:55 -050051# test_install_vfc() - Verify that the VFC are up and running
52function test_install_vfc {
Victor Morales8b8e7392017-09-25 22:13:26 -070053 clone_all_vfc_repos
54 get_vfc_images
Victor Morales94b3e972017-08-17 14:55:55 -050055 install_vfc
56
Victor Morales8b8e7392017-09-25 22:13:26 -070057 asserts_image_running onap/nslcm
58 asserts_image_running onap/gvnfmdriver
59 asserts_image_running onap/vnfres
60 asserts_image_running onap/vnfmgr
61 asserts_image_running onap/vnflcm
Victor Morales94b3e972017-08-17 14:55:55 -050062}
63
Victor Moralesdd074802017-07-26 16:06:35 -050064if [ "$1" != '*' ]; then
65 unset covered_functions
66 covered_functions=$1
67fi
68main "${covered_functions[@]}"