blob: 28de2706581435c8f6ca014520288fc05f366893 [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
Victor Morales54646642017-12-08 11:57:42 -080014 asserts_file_exist ${src_folders[ccsdk]}/dashboard/pom.xml
15 asserts_file_exist ${src_folders[ccsdk]}/distribution/pom.xml
16 asserts_file_exist ${src_folders[ccsdk]}/parent/pom.xml
17 asserts_file_exist ${src_folders[ccsdk]}/platform/blueprints/pom.xml
18 asserts_file_exist ${src_folders[ccsdk]}/platform/nbapi/pom.xml
19 asserts_file_exist ${src_folders[ccsdk]}/platform/plugins/pom.xml
20 asserts_file_exist ${src_folders[ccsdk]}/sli/adaptors/pom.xml
21 asserts_file_exist ${src_folders[ccsdk]}/sli/core/pom.xml
22 asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/pom.xml
23 asserts_file_exist ${src_folders[ccsdk]}/sli/plugins/pom.xml
24 asserts_file_exist ${src_folders[ccsdk]}/storage/esaas/pom.xml
25 asserts_file_exist ${src_folders[ccsdk]}/storage/pgaas/pom.xml
26 asserts_file_exist ${src_folders[ccsdk]}/utils/pom.xml
Victor Morales896c8072017-09-12 12:19:57 -070027}
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 Morales54646642017-12-08 11:57:42 -080034 asserts_file_exist ${src_folders[ccsdk]}/dashboard/ccsdk-app-common/target/ccsdk-app-common-1.1.0-SNAPSHOT.jar
35 asserts_file_exist ${src_folders[ccsdk]}/dashboard/ccsdk-app-os/target/ccsdk-app-os-1.1.0-SNAPSHOT.war
36 asserts_file_exist ${src_folders[ccsdk]}/dashboard/ccsdk-app-overlay/target/ccsdk-app-overlay-1.1.0-SNAPSHOT.war
37 asserts_file_exist ${src_folders[ccsdk]}/distribution/dgbuilder/target/dgbuilder.0.1.0-SNAPSHOT.zip
38 asserts_file_exist ${src_folders[ccsdk]}/distribution/platform-logic/installer/target/platform-logic-installer-0.1.0-SNAPSHOT.zip
39 asserts_file_exist ${src_folders[ccsdk]}/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
Victor Morales54646642017-12-08 11:57:42 -080043 #asserts_file_exist ${src_folders[ccsdk]}/sli/adaptors/$adaptor/$component/target/$adaptor-$component-0.1.0-SNAPSHOT.jar
Victor Moralesf1f1ba52017-11-20 16:38:28 -080044 #done
Victor Morales54646642017-12-08 11:57:42 -080045 #asserts_file_exist ${src_folders[ccsdk]}/sli/adaptors/$adaptor/installer/target/sdnc-$adaptor-0.1.0-SNAPSHOT-installer.zip
Victor Moralesf1f1ba52017-11-20 16:38:28 -080046 #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 Morales54646642017-12-08 11:57:42 -080051 asserts_file_exist ${src_folders[ccsdk]}/sli/core/$core/$component/target/$core-$component-*-SNAPSHOT.jar
Victor Morales896c8072017-09-12 12:19:57 -070052 done
Victor Morales54646642017-12-08 11:57:42 -080053 asserts_file_exist ${src_folders[ccsdk]}/sli/core/$core/installer/target/sdnc-$core-*-SNAPSHOT-installer.zip
Victor Morales896c8072017-09-12 12:19:57 -070054 done
Victor Morales54646642017-12-08 11:57:42 -080055 #asserts_file_exist ${src_folders[ccsdk]}/sli/core/sli/common/target/sli-common-*-SNAPSHOT.jar
56 #asserts_file_exist ${src_folders[ccsdk]}/sli/core/sli/recording/target/sli-recording-*-SNAPSHOT.jar
57 #asserts_file_exist ${src_folders[ccsdk]}/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 Morales54646642017-12-08 11:57:42 -080061 asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/$northbound/$component/target/$northbound-$component-*-SNAPSHOT.jar
Victor Morales896c8072017-09-12 12:19:57 -070062 done
Victor Morales54646642017-12-08 11:57:42 -080063 asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/$northbound/installer/target/sdnc-$northbound-*-SNAPSHOT-installer.zip
Victor Morales896c8072017-09-12 12:19:57 -070064 done
Victor Morales54646642017-12-08 11:57:42 -080065 asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/dmaap-listener/target/dmaap-listener-*-SNAPSHOT.jar
66 asserts_file_exist ${src_folders[ccsdk]}/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 Morales54646642017-12-08 11:57:42 -080070 asserts_file_exist ${src_folders[ccsdk]}/sli/plugins/$plugin/$component/target/$plugin-$component-*-SNAPSHOT.jar
Victor Morales896c8072017-09-12 12:19:57 -070071 done
Victor Morales54646642017-12-08 11:57:42 -080072 asserts_file_exist ${src_folders[ccsdk]}/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[@]}"