Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/vfc |
| 5 | |
| 6 | covered_functions=( |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 7 | "clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc" |
Shashank Kumar Shankar | 0be6894 | 2017-09-14 11:10:41 -0700 | [diff] [blame] | 8 | "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 Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 11 | ) |
| 12 | |
| 13 | # test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories |
| 14 | function test_clone_all_vfc_repos { |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 15 | clone_all_vfc_repos |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 16 | |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 17 | #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 Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 32 | } |
| 33 | |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 34 | # test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly |
| 35 | function 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 Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 42 | # test_get_vfc_images() - Verify all VFC images are built correctly. |
| 43 | function test_get_vfc_images { |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 44 | clone_all_vfc_repos |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 45 | get_vfc_images |
| 46 | |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 47 | 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 Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 52 | } |
| 53 | |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 54 | # test_install_vfc() - Verify that the VFC are up and running |
| 55 | function test_install_vfc { |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 56 | clone_all_vfc_repos |
| 57 | get_vfc_images |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 58 | install_vfc |
| 59 | |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 60 | 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 Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 65 | } |
| 66 | |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 67 | if [ "$1" != '*' ]; then |
| 68 | unset covered_functions |
| 69 | covered_functions=$1 |
| 70 | fi |
| 71 | main "${covered_functions[@]}" |