Victor Morales | d3cbcf2 | 2017-10-25 16:01:58 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/vvp |
| 5 | |
| 6 | covered_functions=( |
| 7 | "clone_all_vvp_repos" "compile_all_vvp_repos" "get_vvp_images" "install_vvp" |
| 8 | ) |
| 9 | |
| 10 | # test_clone_all_vvp_repos() - Verify the cloning of VNFSDK source repo. |
| 11 | function test_clone_all_vvp_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 12 | clone_repos "vvp" |
Victor Morales | d3cbcf2 | 2017-10-25 16:01:58 -0700 | [diff] [blame] | 13 | |
| 14 | asserts_file_exist $vvp_src_folder/cms/pom.xml |
| 15 | asserts_file_exist $vvp_src_folder/devkit/LICENSE.TXT |
| 16 | asserts_file_exist $vvp_src_folder/engagementmgr/pom.xml |
| 17 | asserts_file_exist $vvp_src_folder/gitlab/pom.xml |
| 18 | asserts_file_exist $vvp_src_folder/image-scanner/pom.xml |
| 19 | asserts_file_exist $vvp_src_folder/jenkins/pom.xml |
| 20 | asserts_file_exist $vvp_src_folder/portal/pom.xml |
| 21 | asserts_file_exist $vvp_src_folder/postgresql/pom.xml |
| 22 | asserts_file_exist $vvp_src_folder/test-engine/pom.xml |
| 23 | asserts_file_exist $vvp_src_folder/validation-scripts/LICENSE.txt |
| 24 | } |
| 25 | |
| 26 | # test_compile_all_vvp_repos () - Verify if VNFSDK source repo compiles correctly. |
| 27 | function test_compile_all_vvp_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 28 | clone_repos "vvp" |
| 29 | compile_repos "vvp" |
Victor Morales | d3cbcf2 | 2017-10-25 16:01:58 -0700 | [diff] [blame] | 30 | |
| 31 | # asserts_file_exist $vvp_src_folder/ |
| 32 | } |
| 33 | |
| 34 | # test_get_vvp_images() - Verify that the VNFSDK images are created or retrieved |
| 35 | function test_get_vvp_images { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 36 | clone_repos "vvp" |
Victor Morales | d3cbcf2 | 2017-10-25 16:01:58 -0700 | [diff] [blame] | 37 | get_vvp_images |
| 38 | |
| 39 | #asserts_image refrepo:latest |
| 40 | } |
| 41 | |
| 42 | # test_install_vvp() - Verify that VNFSDK docker images are running. |
| 43 | function test_install_vvp { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 44 | clone_repos "vvp" |
Victor Morales | d3cbcf2 | 2017-10-25 16:01:58 -0700 | [diff] [blame] | 45 | get_vvp_images |
| 46 | install_vvp |
| 47 | |
| 48 | #asserts_image_running refrepo:1.0-STAGING-latest |
| 49 | } |
| 50 | |
| 51 | if [ "$1" != '*' ]; then |
| 52 | unset covered_functions |
| 53 | covered_functions=$1 |
| 54 | fi |
| 55 | main "${covered_functions[@]}" |