Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/ccsdk |
| 5 | |
| 6 | covered_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 |
| 11 | function test_clone_ccsdk_repos { |
| 12 | clone_ccsdk_repos |
| 13 | |
| 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 Morales | 21404d7 | 2017-10-20 13:18:26 -0700 | [diff] [blame] | 30 | function test_compile_ccsdk_repos { |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 31 | clone_ccsdk_repos |
| 32 | compile_ccsdk_repos |
| 33 | |
Victor Morales | 21404d7 | 2017-10-20 13:18:26 -0700 | [diff] [blame] | 34 | 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 Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 37 | 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 |
| 39 | asserts_file_exist $ccsdk_src_folder/platform/nbapi/target/commonnbapi-0.0.3.war |
| 40 | |
| 41 | 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 |
| 47 | |
| 48 | for core in dblib filters sli sliapi sliPluginUtils; do |
| 49 | for component in features provider; do |
| 50 | asserts_file_exist $ccsdk_src_folder/sli/core/$core/$component/target/$core-$component-0.1.2-SNAPSHOT.jar |
| 51 | done |
| 52 | asserts_file_exist $ccsdk_src_folder/sli/core/$core/installer/target/sdnc-$core-0.1.2-SNAPSHOT-installer.zip |
| 53 | done |
| 54 | asserts_file_exist $ccsdk_src_folder/sli/core/sli/common/target/sli-common-0.1.2-SNAPSHOT.jar |
| 55 | asserts_file_exist $ccsdk_src_folder/sli/core/sli/recording/target/sli-recording-0.1.2-SNAPSHOT.jar |
| 56 | asserts_file_exist $ccsdk_src_folder/sli/core/sliapi/model/target/sliapi-model-0.1.2-SNAPSHOT.jar |
| 57 | |
| 58 | for northbound in asdcApi dataChange; do |
| 59 | for component in features model provider; do |
| 60 | asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/$component/target/$northbound-$component-0.1.0-SNAPSHOT.jar |
| 61 | done |
| 62 | asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/installer/target/sdnc-$northbound-0.1.0-SNAPSHOT-installer.zip |
| 63 | done |
| 64 | asserts_file_exist $ccsdk_src_folder/sli/northbound/dmaap-listener/target/dmaap-listener-0.1.0-SNAPSHOT.jar |
| 65 | asserts_file_exist $ccsdk_src_folder/sli/northbound/ueb-listener/target/ueb-listener-0.1.0-SNAPSHOT.jar |
| 66 | |
| 67 | for plugin in properties-node restapi-call-node; do |
| 68 | for component in features provider; do |
| 69 | asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/$component/target/$plugin-$component-0.1.0-SNAPSHOT.jar |
| 70 | done |
| 71 | asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/installer/target/sdnc-$plugin-0.1.0-SNAPSHOT-installer.zip |
| 72 | done |
| 73 | } |
| 74 | |
| 75 | # test_get_ccsdk_images() - Verify that CCSDK images are retrieved or built properly |
| 76 | function test_get_ccsdk_images { |
| 77 | clone_ccsdk_repos |
| 78 | get_ccsdk_images |
| 79 | |
| 80 | for image in dgbuilder odlsli odl ubuntu; do |
| 81 | asserts_image onap/ccsdk-$image-image |
| 82 | done |
| 83 | } |
| 84 | |
| 85 | if [ "$1" != '*' ]; then |
| 86 | unset covered_functions |
| 87 | covered_functions=$1 |
| 88 | fi |
| 89 | main "${covered_functions[@]}" |