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 | |
Victor Morales | 6d280a1 | 2017-10-23 11:56:43 -0700 | [diff] [blame] | 14 | asserts_file_exist $vnfsdk_src_folder/compliance/veslibrary/README |
| 15 | asserts_file_exist $vnfsdk_src_folder/functest/pom.xml |
| 16 | asserts_file_exist $vnfsdk_src_folder/lctest/pom.xml |
| 17 | asserts_file_exist $vnfsdk_src_folder/model/docs/index.rst |
| 18 | asserts_file_exist $vnfsdk_src_folder/pkgtools/pom.xml |
Shashank Kumar Shankar | d52d0af | 2017-10-20 16:06:08 -0700 | [diff] [blame] | 19 | asserts_file_exist $vnfsdk_src_folder/refrepo/pom.xml |
Victor Morales | 6d280a1 | 2017-10-23 11:56:43 -0700 | [diff] [blame] | 20 | asserts_file_exist $vnfsdk_src_folder/validation/pom.xml |
Shashank Kumar Shankar | d52d0af | 2017-10-20 16:06:08 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | # test_compile_all_vnfsdk_repos () - Verify if VNFSDK source repo compiles correctly. |
| 24 | function test_compile_all_vnfsdk_repos { |
| 25 | clone_all_vnfsdk_repos |
Victor Morales | 6d280a1 | 2017-10-23 11:56:43 -0700 | [diff] [blame] | 26 | compile_all_vnfsdk_repos |
| 27 | |
| 28 | asserts_file_exist $vnfsdk_src_folder/lctest/lifecycle-test/target/lifecycle-test-service-1.0.0-SNAPSHOT.war |
| 29 | asserts_file_exist $vnfsdk_src_folder/pkgtools/target/vnf-sdk-pkgtools-1.0.0-SNAPSHOT.zip |
| 30 | asserts_file_exist $vnfsdk_src_folder/refrepo/vnfmarket-be/vnf-sdk-marketplace/target/ROOT.war |
| 31 | asserts_file_exist $vnfsdk_src_folder/validation/csarvalidation/target/validation-csar-1.0.0-SNAPSHOT.jar |
Shashank Kumar Shankar | d52d0af | 2017-10-20 16:06:08 -0700 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | # test_get_vnfsdk_images() - Verify that the VNFSDK images are created or retrieved |
Victor Morales | 6d280a1 | 2017-10-23 11:56:43 -0700 | [diff] [blame] | 35 | function test_get_vnfsdk_images { |
Shashank Kumar Shankar | d52d0af | 2017-10-20 16:06:08 -0700 | [diff] [blame] | 36 | clone_all_vnfsdk_repos |
| 37 | get_vnfsdk_images |
| 38 | |
| 39 | asserts_image refrepo:1.0-STAGING-latest |
| 40 | asserts_image refrepo:latest |
| 41 | } |
| 42 | |
| 43 | # test_install_vnfsdk() - Verify that VNFSDK docker images are running. |
| 44 | function test_install_vnfsdk { |
| 45 | clone_all_vnfsdk_repos |
| 46 | get_vnfsdk_images |
| 47 | install_vnfsdk |
| 48 | |
| 49 | asserts_image_running refrepo:1.0-STAGING-latest |
| 50 | asserts_image refrepo:latest |
| 51 | } |
| 52 | |
| 53 | if [ "$1" != '*' ]; then |
| 54 | unset covered_functions |
| 55 | covered_functions=$1 |
| 56 | fi |
Victor Morales | 6d280a1 | 2017-10-23 11:56:43 -0700 | [diff] [blame] | 57 | main "${covered_functions[@]}" |