blob: 93110a3f0ebfabb0b3b01f50d5ff85a9aef7e1de [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=(
Victor Moralesdbdc30a2017-08-17 11:50:42 -05007"clone_all_sdnc_repos" "compile_all_sdnc_repos" "get_sdnc_images" "install_sdnc"
Victor Moralesdd074802017-07-26 16:06:35 -05008)
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
Victor Moralesdbdc30a2017-08-17 11:50:42 -050026 for adaptor in aai-service mdsal-resource resource-assignment sql-resource; do
27 asserts_file_exist $src_folder/adaptors/$adaptor/features/target/$adaptor-features-1.1.2-SNAPSHOT.jar
28 asserts_file_exist $src_folder/adaptors/$adaptor/installer/target/sdnc-$adaptor-1.1.2-SNAPSHOT-installer.zip
29 asserts_file_exist $src_folder/adaptors/$adaptor/provider/target/$adaptor-provider-1.1.2-SNAPSHOT.jar
30 done
31
32 asserts_file_exist $src_folder/core/dblib/provider/target/dblib-provider-1.1.2-SNAPSHOT.jar
Victor Moralesdd074802017-07-26 16:06:35 -050033 asserts_file_exist $src_folder/core/rootpom/target/rootpom-1.1.0-site_en.xml
Victor Moralesdbdc30a2017-08-17 11:50:42 -050034 asserts_file_exist $src_folder/core/target/sdnc-core-1.1.2-SNAPSHOT-site.xml
35
36 for component in asdcApi dataChange vnfapi vnftools; do
37 asserts_file_exist $src_folder/northbound/$component/features/target/$component-features-1.1.2-SNAPSHOT.jar
38 asserts_file_exist $src_folder/northbound/$component/installer/target/sdnc-$component-1.1.2-SNAPSHOT-installer.zip
39 if [[ "$component" != "vnftools" ]]; then
40 asserts_file_exist $src_folder/northbound/$component/model/target/$component-model-1.1.2-SNAPSHOT.jar
41 fi
42 asserts_file_exist $src_folder/northbound/$component/provider/target/$component-provider-1.1.2-SNAPSHOT.jar
43 done
44 asserts_file_exist $src_folder/northbound/dmaap-listener/target/dmaap-listener-1.1.2-SNAPSHOT.jar
45 asserts_file_exist $src_folder/northbound/ueb-listener/target/ueb-listener-1.1.2-SNAPSHOT.jar
46
47 asserts_file_exist $src_folder/oam/admportal/target/admportal.1.1.2-SNAPSHOT.zip
48 asserts_file_exist $src_folder/oam/dgbuilder/target/dgbuilder.1.1.2-SNAPSHOT.zip
49 asserts_file_exist $src_folder/oam/platform-logic/installer/target/platform-logic-installer-1.1.2-SNAPSHOT.zip
50
51 for plugin in properties-node restapi-call-node; do
52 asserts_file_exist $src_folder/plugins/$plugin/features/target/$plugin-features-1.1.2-SNAPSHOT.jar
53 asserts_file_exist $src_folder/plugins/$plugin/installer/target/sdnc-$plugin-1.1.2-SNAPSHOT-installer.zip
54 asserts_file_exist $src_folder/plugins/$plugin/provider/target/$plugin-provider-1.1.2-SNAPSHOT.jar
55 done
Victor Moralesdd074802017-07-26 16:06:35 -050056}
57
58# test_get_sdnc_images() - Verify that the SDNC images are created or retrieved
59function test_get_sdnc_images {
60 clone_all_sdnc_repos
61 get_sdnc_images
62
63 asserts_image openecomp/sdnc-image
64 asserts_image openecomp/admportal-sdnc-image
65 asserts_image openecomp/dgbuilder-sdnc-image
Victor Moralesdbdc30a2017-08-17 11:50:42 -050066 asserts_image mysql/mysql-server:5.6
67}
68
69# test_install_sdnc() - Verify that the SDNC Docker containers are up and running
70function test_install_sdnc {
71 clone_all_sdnc_repos
72 get_sdnc_images
73 install_sdnc
74
75 asserts_image_running openecomp/dgbuilder-sdnc-image
76 asserts_image_running openecomp/admportal-sdnc-image
77 asserts_image_running openecomp/sdnc-image
78 asserts_image_running mysql/mysql-server:5.6
Victor Moralesdd074802017-07-26 16:06:35 -050079}
80
81if [ "$1" != '*' ]; then
82 unset covered_functions
83 covered_functions=$1
84fi
85main "${covered_functions[@]}"