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 { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 12 | clone_repos "ccsdk" |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 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 | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 31 | clone_repos "ccsdk" |
| 32 | compile_repos "ccsdk" |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 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 |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 39 | asserts_file_exist $ccsdk_src_folder/platform/nbapi/target/commonnbapi-*.war |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 40 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 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 |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 47 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 48 | #for core in dblib filters sli sliapi sliPluginUtils; do |
| 49 | for core in dblib; do |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 50 | for component in features provider; do |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 51 | asserts_file_exist $ccsdk_src_folder/sli/core/$core/$component/target/$core-$component-*-SNAPSHOT.jar |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 52 | done |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 53 | asserts_file_exist $ccsdk_src_folder/sli/core/$core/installer/target/sdnc-$core-*-SNAPSHOT-installer.zip |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 54 | done |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 55 | #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 Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 58 | |
| 59 | for northbound in asdcApi dataChange; do |
| 60 | for component in features model provider; do |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 61 | asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/$component/target/$northbound-$component-*-SNAPSHOT.jar |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 62 | done |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 63 | asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/installer/target/sdnc-$northbound-*-SNAPSHOT-installer.zip |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 64 | done |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 65 | 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 Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 67 | |
| 68 | for plugin in properties-node restapi-call-node; do |
| 69 | for component in features provider; do |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 70 | asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/$component/target/$plugin-$component-*-SNAPSHOT.jar |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 71 | done |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 72 | asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/installer/target/sdnc-$plugin-*-SNAPSHOT-installer.zip |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 73 | done |
| 74 | } |
| 75 | |
| 76 | # test_get_ccsdk_images() - Verify that CCSDK images are retrieved or built properly |
| 77 | function test_get_ccsdk_images { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 78 | clone_repos "ccsdk" |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 79 | get_ccsdk_images |
| 80 | |
| 81 | for image in dgbuilder odlsli odl ubuntu; do |
| 82 | asserts_image onap/ccsdk-$image-image |
| 83 | done |
| 84 | } |
| 85 | |
| 86 | if [ "$1" != '*' ]; then |
| 87 | unset covered_functions |
| 88 | covered_functions=$1 |
| 89 | fi |
| 90 | main "${covered_functions[@]}" |