Shashank Kumar Shankar | d52d0af | 2017-10-20 16:06:08 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/vnfsdk |
| 5 | |
| 6 | covered_functions=( |
| 7 | "clone_all_vnfsdk_repos" "compile_all_vnfsdk_repos" "get_vnfsdk_images" "install_vnfsdk" |
| 8 | ) |
| 9 | |
| 10 | # test_clone_all_vnfsdk_repos() - Verify the cloning of VNFSDK source repo. |
| 11 | function test_clone_all_vnfsdk_repos { |
| 12 | clone_all_vnfsdk_repos |
| 13 | |
| 14 | asserts_file_exist $vnfsdk_src_folder/refrepo/pom.xml |
| 15 | } |
| 16 | |
| 17 | # test_compile_all_vnfsdk_repos () - Verify if VNFSDK source repo compiles correctly. |
| 18 | function test_compile_all_vnfsdk_repos { |
| 19 | clone_all_vnfsdk_repos |
| 20 | { |
| 21 | compile_all_vnfsdk_repos |
| 22 | } || { |
| 23 | set -e |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | # test_get_vnfsdk_images() - Verify that the VNFSDK images are created or retrieved |
| 28 | function test_get_vnfsdk_images { |
| 29 | clone_all_vnfsdk_repos |
| 30 | get_vnfsdk_images |
| 31 | |
| 32 | asserts_image refrepo:1.0-STAGING-latest |
| 33 | asserts_image refrepo:latest |
| 34 | } |
| 35 | |
| 36 | # test_install_vnfsdk() - Verify that VNFSDK docker images are running. |
| 37 | function test_install_vnfsdk { |
| 38 | clone_all_vnfsdk_repos |
| 39 | get_vnfsdk_images |
| 40 | install_vnfsdk |
| 41 | |
| 42 | asserts_image_running refrepo:1.0-STAGING-latest |
| 43 | asserts_image refrepo:latest |
| 44 | } |
| 45 | |
| 46 | if [ "$1" != '*' ]; then |
| 47 | unset covered_functions |
| 48 | covered_functions=$1 |
| 49 | fi |
| 50 | main "${covered_functions[@]}" |