Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/appc |
| 5 | |
| 6 | covered_functions=( |
| 7 | "clone_all_appc_repos" "compile_all_appc_repos" "get_appc_images" "install_appc" |
| 8 | ) |
| 9 | |
| 10 | # test_clone_all_appc_repos() - Verify that the APPC source code is cloned |
| 11 | function test_clone_all_appc_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 12 | clone_repos "appc" |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 13 | |
| 14 | asserts_file_exist $appc_src_folder/pom.xml |
| 15 | asserts_file_exist $appc_src_folder/deployment/pom.xml |
| 16 | } |
| 17 | |
| 18 | # test_compile_all_appc_repos() - Verify that the APPC source code is compiled properly |
| 19 | function test_compile_all_appc_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 20 | clone_repos "appc" |
| 21 | compile_repos "appc" |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 22 | |
| 23 | for adapter in appc-ansible-adapter appc-chef-adapter appc-dmaap-adapter appc-iaas-adapter appc-netconf-adapter appc-rest-adapter appc-rest-healthcheck-adapter; do |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 24 | asserts_file_exist $appc_src_folder/appc-adapters/$adapter/$adapter-bundle/target/$adapter-bundle-*-SNAPSHOT.jar |
| 25 | asserts_file_exist $appc_src_folder/appc-adapters/$adapter/$adapter-features/target/$adapter-features-*-SNAPSHOT.jar |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 26 | if [[ "$adapter" == "appc-netconf-adapter" ]]; then |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 27 | asserts_file_exist $appc_src_folder/appc-adapters/$adapter/appc-netconf-installer/target/$adapter-*-SNAPSHOT.zip |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 28 | else |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 29 | asserts_file_exist $appc_src_folder/appc-adapters/$adapter/$adapter-installer/target/$adapter-*-SNAPSHOT.zip |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 30 | fi |
| 31 | done |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 32 | asserts_file_exist $appc_src_folder/appc-adapters/appc-dmaap-adapter/appc-message-adapter-api/target/appc-message-adapter-api-*-SNAPSHOT.jar |
| 33 | asserts_file_exist $appc_src_folder/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/target/appc-message-adapter-factory-*-SNAPSHOT.jar |
| 34 | asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/target/appc-ssh-adapter-api-*-SNAPSHOT.jar |
| 35 | asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-features/target/appc-ssh-adapter-features-*-SNAPSHOT.jar |
| 36 | asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/target/appc-ssh-adapter-sshd-*-SNAPSHOT.jar |
| 37 | asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/target/appc-ssh-adapter-tests-*-SNAPSHOT.jar |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 38 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 39 | #for component in appc-event-listener appc-oam appc-provider; do |
| 40 | for component in appc-event-listener appc-provider; do |
| 41 | asserts_file_exist $appc_src_folder/$component/$component-bundle/target/$component-bundle-*-SNAPSHOT.jar |
| 42 | asserts_file_exist $appc_src_folder/$component/$component-features/target/$component-features-*-SNAPSHOT.jar |
| 43 | asserts_file_exist $appc_src_folder/$component/$component-installer/target/$component-*-SNAPSHOT.zip |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 44 | done |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 45 | #for component in appc-oam appc-provider; do |
| 46 | for component in appc-provider; do |
| 47 | asserts_file_exist $appc_src_folder/$component/$component-model/target/$component-model-*-SNAPSHOT.jar |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 48 | done |
| 49 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 50 | asserts_file_exist $appc_src_folder/appc-common/target/appc-common-*-SNAPSHOT.jar |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 51 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 52 | asserts_file_exist $appc_src_folder/appc-dg/appc-dg-shared/appc-dg-dependency-model/target/appc-dg-dependency-model-*-SNAPSHOT.jar |
| 53 | asserts_file_exist $appc_src_folder/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/target/appc-dg-domain-model-lib-*-SNAPSHOT.jar |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 54 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 55 | asserts_file_exist $appc_src_folder/appc-dispatcher/appc-command-executor/appc-command-executor-api/target/appc-command-executor-api-*-SNAPSHOT.jar |
| 56 | asserts_file_exist $appc_src_folder/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/target/appc-data-access-lib-*-SNAPSHOT.jar |
| 57 | asserts_file_exist $appc_src_folder/appc-dispatcher/appc-dispatcher-common/domain-model-lib/target/domain-model-lib-*-SNAPSHOT.jar |
| 58 | asserts_file_exist $appc_src_folder/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/target/execution-queue-management-lib-*-SNAPSHOT.jar |
| 59 | asserts_file_exist $appc_src_folder/appc-dispatcher/appc-license-manager/appc-license-manager-api/target/appc-license-manager-api-*-SNAPSHOT.jar |
| 60 | asserts_file_exist $appc_src_folder/appc-dispatcher/appc-request-handler/appc-request-handler-api/target/appc-request-handler-api-*-SNAPSHOT.jar |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 61 | |
| 62 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 63 | #asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-api/target/appc-lifecycle-management-api-*-SNAPSHOT.jar |
| 64 | #asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-core/target/appc-lifecycle-management-core-*-SNAPSHOT.jar |
| 65 | #asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-features/target/appc-lifecycle-management-features-*-SNAPSHOT.jar |
| 66 | #asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-installer/target/appc-lifecycle-management-*-SNAPSHOT.zip |
| 67 | #asserts_file_exist $appc_src_folder/appc-lifecycle-management/state-machine-lib/target/state-machine-lib-*-SNAPSHOT.jar |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 68 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 69 | asserts_file_exist $appc_src_folder/appc-metric/appc-metric-bundle/target/appc-metric-bundle-*-SNAPSHOT.jar |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 70 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 71 | asserts_file_exist $appc_src_folder/deployment/platform-logic/installer/target/platform-logic-installer-*-SNAPSHOT.zip |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | # test_get_appc_images() - Verify that APPC Docker images can be retrieved |
| 75 | function test_get_appc_images { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 76 | clone_repos "appc" |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 77 | get_appc_images |
| 78 | |
| 79 | asserts_image openecomp/appc-image |
| 80 | } |
| 81 | |
| 82 | # test_install_appc() - Verify that the APPC Docker images are up and running |
| 83 | function test_install_appc { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 84 | clone_repos "appc" |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 85 | get_appc_images |
| 86 | install_appc |
| 87 | |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 88 | asserts_image_running openecomp/appc-image |
Victor Morales | 65deef2 | 2017-08-18 20:53:42 -0500 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | if [ "$1" != '*' ]; then |
| 92 | unset covered_functions |
| 93 | covered_functions=$1 |
| 94 | fi |
| 95 | main "${covered_functions[@]}" |