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