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 | 2685570 | 2017-09-26 07:57:11 -0700 | [diff] [blame] | 7 | "clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc" "get_vfc_images" |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 8 | ) |
| 9 | |
| 10 | # test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories |
| 11 | function test_clone_all_vfc_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 12 | clone_repos "vfc" |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 13 | |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 14 | #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 Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 29 | } |
| 30 | |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 31 | # test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly |
| 32 | function test_compile_all_vfc_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 33 | clone_repos "vfc" |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 34 | compile_all_vfc_repos |
| 35 | |
| 36 | # TODO(electrocucaracha): Add asserts_file_exist |
| 37 | } |
| 38 | |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 39 | # test_get_vfc_images() - Verify all VFC images are built correctly. |
| 40 | function test_get_vfc_images { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 41 | clone_repos "vfc" |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 42 | get_vfc_images |
| 43 | |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 44 | 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 Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 49 | } |
| 50 | |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 51 | # test_install_vfc() - Verify that the VFC are up and running |
| 52 | function test_install_vfc { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 53 | clone_repos "vfc" |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 54 | get_vfc_images |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 55 | install_vfc |
| 56 | |
Victor Morales | 8b8e739 | 2017-09-25 22:13:26 -0700 | [diff] [blame] | 57 | 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 Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 62 | } |
| 63 | |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 64 | if [ "$1" != '*' ]; then |
| 65 | unset covered_functions |
| 66 | covered_functions=$1 |
| 67 | fi |
| 68 | main "${covered_functions[@]}" |