blob: 489ccdb2d8dcf329bcf6e355429dc92912b1c9d4 [file] [log] [blame]
Victor Morales896c8072017-09-12 12:19:57 -07001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/ccsdk
5
6covered_functions=(
7"clone_ccsdk_repos" "compile_ccsdk_repos" "get_ccsdk_images"
8)
9
10# test_clone_ccsdk_repos() - Verify that CCSDL repositories are retrieved properly
11function test_clone_ccsdk_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "ccsdk"
Victor Morales896c8072017-09-12 12:19:57 -070013
14 asserts_file_exist $ccsdk_src_folder/dashboard/pom.xml
15 asserts_file_exist $ccsdk_src_folder/distribution/pom.xml
16 asserts_file_exist $ccsdk_src_folder/parent/pom.xml
17 asserts_file_exist $ccsdk_src_folder/platform/blueprints/pom.xml
18 asserts_file_exist $ccsdk_src_folder/platform/nbapi/pom.xml
19 asserts_file_exist $ccsdk_src_folder/platform/plugins/pom.xml
20 asserts_file_exist $ccsdk_src_folder/sli/adaptors/pom.xml
21 asserts_file_exist $ccsdk_src_folder/sli/core/pom.xml
22 asserts_file_exist $ccsdk_src_folder/sli/northbound/pom.xml
23 asserts_file_exist $ccsdk_src_folder/sli/plugins/pom.xml
24 asserts_file_exist $ccsdk_src_folder/storage/esaas/pom.xml
25 asserts_file_exist $ccsdk_src_folder/storage/pgaas/pom.xml
26 asserts_file_exist $ccsdk_src_folder/utils/pom.xml
27}
28
29# test_compile_ccsdk_repos() - Verify the compilation of CCSDK repositories
Victor Morales21404d72017-10-20 13:18:26 -070030function test_compile_ccsdk_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080031 clone_repos "ccsdk"
32 compile_repos "ccsdk"
Victor Morales896c8072017-09-12 12:19:57 -070033
Victor Morales21404d72017-10-20 13:18:26 -070034 asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-common/target/ccsdk-app-common-1.1.0-SNAPSHOT.jar
35 asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-os/target/ccsdk-app-os-1.1.0-SNAPSHOT.war
36 asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-overlay/target/ccsdk-app-overlay-1.1.0-SNAPSHOT.war
Victor Morales896c8072017-09-12 12:19:57 -070037 asserts_file_exist $ccsdk_src_folder/distribution/dgbuilder/target/dgbuilder.0.1.0-SNAPSHOT.zip
38 asserts_file_exist $ccsdk_src_folder/distribution/platform-logic/installer/target/platform-logic-installer-0.1.0-SNAPSHOT.zip
Victor Moralesf1f1ba52017-11-20 16:38:28 -080039 asserts_file_exist $ccsdk_src_folder/platform/nbapi/target/commonnbapi-*.war
Victor Morales896c8072017-09-12 12:19:57 -070040
Victor Moralesf1f1ba52017-11-20 16:38:28 -080041 #for adaptor in aai-service mdsal-resource resource-assignment sql-resource; do
42 #for component in features provider; do
43 #asserts_file_exist $ccsdk_src_folder/sli/adaptors/$adaptor/$component/target/$adaptor-$component-0.1.0-SNAPSHOT.jar
44 #done
45 #asserts_file_exist $ccsdk_src_folder/sli/adaptors/$adaptor/installer/target/sdnc-$adaptor-0.1.0-SNAPSHOT-installer.zip
46 #done
Victor Morales896c8072017-09-12 12:19:57 -070047
Victor Moralesf1f1ba52017-11-20 16:38:28 -080048 #for core in dblib filters sli sliapi sliPluginUtils; do
49 for core in dblib; do
Victor Morales896c8072017-09-12 12:19:57 -070050 for component in features provider; do
Victor Moralesf1f1ba52017-11-20 16:38:28 -080051 asserts_file_exist $ccsdk_src_folder/sli/core/$core/$component/target/$core-$component-*-SNAPSHOT.jar
Victor Morales896c8072017-09-12 12:19:57 -070052 done
Victor Moralesf1f1ba52017-11-20 16:38:28 -080053 asserts_file_exist $ccsdk_src_folder/sli/core/$core/installer/target/sdnc-$core-*-SNAPSHOT-installer.zip
Victor Morales896c8072017-09-12 12:19:57 -070054 done
Victor Moralesf1f1ba52017-11-20 16:38:28 -080055 #asserts_file_exist $ccsdk_src_folder/sli/core/sli/common/target/sli-common-*-SNAPSHOT.jar
56 #asserts_file_exist $ccsdk_src_folder/sli/core/sli/recording/target/sli-recording-*-SNAPSHOT.jar
57 #asserts_file_exist $ccsdk_src_folder/sli/core/sliapi/model/target/sliapi-model-*-SNAPSHOT.jar
Victor Morales896c8072017-09-12 12:19:57 -070058
59 for northbound in asdcApi dataChange; do
60 for component in features model provider; do
Victor Moralesf1f1ba52017-11-20 16:38:28 -080061 asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/$component/target/$northbound-$component-*-SNAPSHOT.jar
Victor Morales896c8072017-09-12 12:19:57 -070062 done
Victor Moralesf1f1ba52017-11-20 16:38:28 -080063 asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/installer/target/sdnc-$northbound-*-SNAPSHOT-installer.zip
Victor Morales896c8072017-09-12 12:19:57 -070064 done
Victor Moralesf1f1ba52017-11-20 16:38:28 -080065 asserts_file_exist $ccsdk_src_folder/sli/northbound/dmaap-listener/target/dmaap-listener-*-SNAPSHOT.jar
66 asserts_file_exist $ccsdk_src_folder/sli/northbound/ueb-listener/target/ueb-listener-*-SNAPSHOT.jar
Victor Morales896c8072017-09-12 12:19:57 -070067
68 for plugin in properties-node restapi-call-node; do
69 for component in features provider; do
Victor Moralesf1f1ba52017-11-20 16:38:28 -080070 asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/$component/target/$plugin-$component-*-SNAPSHOT.jar
Victor Morales896c8072017-09-12 12:19:57 -070071 done
Victor Moralesf1f1ba52017-11-20 16:38:28 -080072 asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/installer/target/sdnc-$plugin-*-SNAPSHOT-installer.zip
Victor Morales896c8072017-09-12 12:19:57 -070073 done
74}
75
76# test_get_ccsdk_images() - Verify that CCSDK images are retrieved or built properly
77function test_get_ccsdk_images {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080078 clone_repos "ccsdk"
Victor Morales896c8072017-09-12 12:19:57 -070079 get_ccsdk_images
80
81 for image in dgbuilder odlsli odl ubuntu; do
82 asserts_image onap/ccsdk-$image-image
83 done
84}
85
86if [ "$1" != '*' ]; then
87 unset covered_functions
88 covered_functions=$1
89fi
90main "${covered_functions[@]}"