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 { |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 15 | |
| 16 | # TODO(sshank): Add other asserts |
| 17 | asserts_file_exist $src_folder/nfvo/lcm/run.sh |
| 18 | |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 19 | } |
| 20 | |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 21 | # test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly |
| 22 | function test_compile_all_vfc_repos { |
| 23 | clone_all_vfc_repos |
| 24 | compile_all_vfc_repos |
| 25 | |
| 26 | # TODO(electrocucaracha): Add asserts_file_exist |
| 27 | } |
| 28 | |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 29 | # test_get_vfc_images() - Verify all VFC images are built correctly. |
| 30 | function test_get_vfc_images { |
| 31 | get_vfc_images |
| 32 | |
| 33 | asserts_image nexus3.onap.org:10003/onap/vfc/nslcm |
Shashank Kumar Shankar | 0be6894 | 2017-09-14 11:10:41 -0700 | [diff] [blame] | 34 | asserts_image nexus3.onap.org:10003/onap/vfc/gvnfmdriver |
| 35 | asserts_image nexus3.onap.org:10003/onap/vfc/vnfres |
| 36 | asserts_image nexus3.onap.org:10003/onap/vfc/vnfmgr |
| 37 | asserts_image nexus3.onap.org:10003/onap/vfc/vnflcm |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 38 | |
Shashank Kumar Shankar | 0be6894 | 2017-09-14 11:10:41 -0700 | [diff] [blame] | 39 | # TODO(sshank): Add asserts for other VFC component docker image builds. |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 40 | } |
| 41 | |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 42 | # test_install_vfc() - Verify that the VFC are up and running |
| 43 | function test_install_vfc { |
| 44 | install_vfc |
| 45 | |
Shashank Kumar Shankar | 0be6894 | 2017-09-14 11:10:41 -0700 | [diff] [blame] | 46 | asserts_image_running nexus3.onap.org:10003/onap/vfc/nslcm:latest |
| 47 | asserts_image_running nexus3.onap.org:10003/onap/vfc/gvnfmdriver:latest |
| 48 | asserts_image_running nexus3.onap.org:10003/onap/vfc/vnfres:latest |
| 49 | asserts_image_running nexus3.onap.org:10003/onap/vfc/vnfmgr:latest |
| 50 | asserts_image_running nexus3.onap.org:10003/onap/vfc/vnflcm:latest |
Shashank Kumar Shankar | 6cc4a43 | 2017-09-05 13:26:19 -0700 | [diff] [blame] | 51 | |
Shashank Kumar Shankar | 0be6894 | 2017-09-14 11:10:41 -0700 | [diff] [blame] | 52 | # TODO(sshank): Add asserts for other running VFC component docker images. |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 53 | } |
| 54 | |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 55 | if [ "$1" != '*' ]; then |
| 56 | unset covered_functions |
| 57 | covered_functions=$1 |
| 58 | fi |
| 59 | main "${covered_functions[@]}" |