blob: 16e517a5ee05bd5beada47d345e2cb884181d5e8 [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 Morales94b3e972017-08-17 14:55:55 -05007"clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc"
Shashank Kumar Shankar0be68942017-09-14 11:10:41 -07008"get_vfc_images" "run_vfc_images" "build_nfvo_lcm_image"
9"build_gvnfm_lcm_image" "build_gvnfm_vnfmgr_image" "build_gvnfm_vnfres_image"
10"build_nfvo_lcm_image" "build_nfvo_vnfm_gvnfmadapter_image"
Victor Moralesdd074802017-07-26 16:06:35 -050011)
12
13# test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories
14function test_clone_all_vfc_repos {
Victor Morales8b8e7392017-09-25 22:13:26 -070015 clone_all_vfc_repos
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070016
Victor Morales8b8e7392017-09-25 22:13:26 -070017 #asserts_file_exist $vfc_src_folder/pom.xml
18 #asserts_file_exist $vfc_src_folder/gvnfm
19 asserts_file_exist $vfc_src_folder/gvnfm/vnflcm/pom.xml
20 asserts_file_exist $vfc_src_folder/gvnfm/vnfmgr/pom.xml
21 asserts_file_exist $vfc_src_folder/gvnfm/vnfres/pom.xml
22 #asserts_file_exist $vfc_src_folder/nfvo
23 asserts_file_exist $vfc_src_folder/nfvo/catalog/run.sh
24 #asserts_file_exist $vfc_src_folder/nfvo/driver
25 asserts_file_exist $vfc_src_folder/nfvo/driver/ems/pom.xml
26 asserts_file_exist $vfc_src_folder/nfvo/driver/sfc/pom.xml
27 #asserts_file_exist $vfc_src_folder/nfvo/driver/vnfm
28 asserts_file_exist $vfc_src_folder/nfvo/driver/vnfm/gvnfm/pom.xml
29 asserts_file_exist $vfc_src_folder/nfvo/driver/vnfm/svnfm/pom.xml
30 asserts_file_exist $vfc_src_folder/nfvo/lcm/pom.xml
31 asserts_file_exist $vfc_src_folder/nfvo/wfengine/wso2/pom.xml
Victor Moralesdd074802017-07-26 16:06:35 -050032}
33
Victor Morales94b3e972017-08-17 14:55:55 -050034# test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly
35function test_compile_all_vfc_repos {
36 clone_all_vfc_repos
37 compile_all_vfc_repos
38
39 # TODO(electrocucaracha): Add asserts_file_exist
40}
41
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070042# test_get_vfc_images() - Verify all VFC images are built correctly.
43function test_get_vfc_images {
Victor Morales8b8e7392017-09-25 22:13:26 -070044 clone_all_vfc_repos
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070045 get_vfc_images
46
Victor Morales8b8e7392017-09-25 22:13:26 -070047 asserts_image onap/gvnfmdriver
48 asserts_image onap/nslcm
49 asserts_image onap/vnfres
50 asserts_image onap/vnfmgr
51 asserts_image onap/vnflcm
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070052}
53
Victor Morales94b3e972017-08-17 14:55:55 -050054# test_install_vfc() - Verify that the VFC are up and running
55function test_install_vfc {
Victor Morales8b8e7392017-09-25 22:13:26 -070056 clone_all_vfc_repos
57 get_vfc_images
Victor Morales94b3e972017-08-17 14:55:55 -050058 install_vfc
59
Victor Morales8b8e7392017-09-25 22:13:26 -070060 asserts_image_running onap/nslcm
61 asserts_image_running onap/gvnfmdriver
62 asserts_image_running onap/vnfres
63 asserts_image_running onap/vnfmgr
64 asserts_image_running onap/vnflcm
Victor Morales94b3e972017-08-17 14:55:55 -050065}
66
Victor Moralesdd074802017-07-26 16:06:35 -050067if [ "$1" != '*' ]; then
68 unset covered_functions
69 covered_functions=$1
70fi
71main "${covered_functions[@]}"