blob: 3fadeafad593ec6d974c6aa76eda2dbb34dda6e3 [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 Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "vfc"
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070013
Victor Morales54646642017-12-08 11:57:42 -080014 #asserts_file_exist ${src_folders[vfc]}/pom.xml
15 #asserts_file_exist ${src_folders[vfc]}/gvnfm
16 asserts_file_exist ${src_folders[vfc]}/gvnfm/vnflcm/pom.xml
17 asserts_file_exist ${src_folders[vfc]}/gvnfm/vnfmgr/pom.xml
18 asserts_file_exist ${src_folders[vfc]}/gvnfm/vnfres/pom.xml
19 #asserts_file_exist ${src_folders[vfc]}/nfvo
20 asserts_file_exist ${src_folders[vfc]}/nfvo/catalog/run.sh
21 #asserts_file_exist ${src_folders[vfc]}/nfvo/driver
22 asserts_file_exist ${src_folders[vfc]}/nfvo/driver/ems/pom.xml
23 asserts_file_exist ${src_folders[vfc]}/nfvo/driver/sfc/pom.xml
24 #asserts_file_exist ${src_folders[vfc]}/nfvo/driver/vnfm
25 asserts_file_exist ${src_folders[vfc]}/nfvo/driver/vnfm/gvnfm/pom.xml
26 asserts_file_exist ${src_folders[vfc]}/nfvo/driver/vnfm/svnfm/pom.xml
27 asserts_file_exist ${src_folders[vfc]}/nfvo/lcm/pom.xml
28 asserts_file_exist ${src_folders[vfc]}/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 {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080033 clone_repos "vfc"
Victor Morales94b3e972017-08-17 14:55:55 -050034 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 Moralesf1f1ba52017-11-20 16:38:28 -080041 clone_repos "vfc"
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 Moralesf1f1ba52017-11-20 16:38:28 -080053 clone_repos "vfc"
Victor Morales8b8e7392017-09-25 22:13:26 -070054 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[@]}"