blob: be900d3d886e07708f191915c65b514a8b2dbe5c [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/sdnc
5
6covered_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
11function 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
22function 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
32function 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
41if [ "$1" != '*' ]; then
42 unset covered_functions
43 covered_functions=$1
44fi
45main "${covered_functions[@]}"