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/sdnc |
| 5 | |
| 6 | covered_functions=( |
| 7 | "clone_all_sdnc_repos" "compile_all_sdnc_repos" "get_sdnc_images" |
| 8 | ) |
| 9 | |
| 10 | # test_clone_all_sdnc_repos() - Verify the source code retrieve of SDNC project |
| 11 | function test_clone_all_sdnc_repos { |
| 12 | clone_all_sdnc_repos |
| 13 | |
| 14 | asserts_file_exist $src_folder/core/pom.xml |
| 15 | asserts_file_exist $src_folder/adaptors/pom.xml |
| 16 | asserts_file_exist $src_folder/northbound/pom.xml |
| 17 | asserts_file_exist $src_folder/plugins/pom.xml |
| 18 | asserts_file_exist $src_folder/oam/pom.xml |
| 19 | } |
| 20 | |
| 21 | # test_compile_all_sdnc_repos() - Verify the correct compilation of SDNC projects |
| 22 | function test_compile_all_sdnc_repos { |
| 23 | clone_all_sdnc_repos |
| 24 | compile_all_sdnc_repos |
| 25 | |
| 26 | asserts_file_exist $src_folder/core/rootpom/boron-sr1/target/classes/LICENSE |
| 27 | asserts_file_exist $src_folder/core/rootpom/boron-sr3/target/classes/LICENSE |
| 28 | asserts_file_exist $src_folder/core/rootpom/target/rootpom-1.1.0-site_en.xml |
| 29 | } |
| 30 | |
| 31 | # test_get_sdnc_images() - Verify that the SDNC images are created or retrieved |
| 32 | function test_get_sdnc_images { |
| 33 | clone_all_sdnc_repos |
| 34 | get_sdnc_images |
| 35 | |
| 36 | asserts_image openecomp/sdnc-image |
| 37 | asserts_image openecomp/admportal-sdnc-image |
| 38 | asserts_image openecomp/dgbuilder-sdnc-image |
| 39 | } |
| 40 | |
| 41 | if [ "$1" != '*' ]; then |
| 42 | unset covered_functions |
| 43 | covered_functions=$1 |
| 44 | fi |
| 45 | main "${covered_functions[@]}" |