blob: 47efa690a9db9a4d037893ed5d9035e0d2ceb839 [file] [log] [blame]
Victor Morales65deef22017-08-18 20:53:42 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/appc
5
6covered_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
11function test_clone_all_appc_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "appc"
Victor Morales65deef22017-08-18 20:53:42 -050013
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
19function test_compile_all_appc_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080020 clone_repos "appc"
21 compile_repos "appc"
Victor Morales65deef22017-08-18 20:53:42 -050022
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 Moralesf1f1ba52017-11-20 16:38:28 -080024 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 Morales65deef22017-08-18 20:53:42 -050026 if [[ "$adapter" == "appc-netconf-adapter" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080027 asserts_file_exist $appc_src_folder/appc-adapters/$adapter/appc-netconf-installer/target/$adapter-*-SNAPSHOT.zip
Victor Morales65deef22017-08-18 20:53:42 -050028 else
Victor Moralesf1f1ba52017-11-20 16:38:28 -080029 asserts_file_exist $appc_src_folder/appc-adapters/$adapter/$adapter-installer/target/$adapter-*-SNAPSHOT.zip
Victor Morales65deef22017-08-18 20:53:42 -050030 fi
31 done
Victor Moralesf1f1ba52017-11-20 16:38:28 -080032 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 Morales65deef22017-08-18 20:53:42 -050038
Victor Moralesf1f1ba52017-11-20 16:38:28 -080039 #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 Morales65deef22017-08-18 20:53:42 -050044 done
Victor Moralesf1f1ba52017-11-20 16:38:28 -080045 #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 Morales65deef22017-08-18 20:53:42 -050048 done
49
Victor Moralesf1f1ba52017-11-20 16:38:28 -080050 asserts_file_exist $appc_src_folder/appc-common/target/appc-common-*-SNAPSHOT.jar
Victor Morales65deef22017-08-18 20:53:42 -050051
Victor Moralesf1f1ba52017-11-20 16:38:28 -080052 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 Morales65deef22017-08-18 20:53:42 -050054
Victor Moralesf1f1ba52017-11-20 16:38:28 -080055 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 Morales65deef22017-08-18 20:53:42 -050061
62
Victor Moralesf1f1ba52017-11-20 16:38:28 -080063 #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 Morales65deef22017-08-18 20:53:42 -050068
Victor Moralesf1f1ba52017-11-20 16:38:28 -080069 asserts_file_exist $appc_src_folder/appc-metric/appc-metric-bundle/target/appc-metric-bundle-*-SNAPSHOT.jar
Victor Morales65deef22017-08-18 20:53:42 -050070
Victor Moralesf1f1ba52017-11-20 16:38:28 -080071 asserts_file_exist $appc_src_folder/deployment/platform-logic/installer/target/platform-logic-installer-*-SNAPSHOT.zip
Victor Morales65deef22017-08-18 20:53:42 -050072}
73
74# test_get_appc_images() - Verify that APPC Docker images can be retrieved
75function test_get_appc_images {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080076 clone_repos "appc"
Victor Morales65deef22017-08-18 20:53:42 -050077 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
83function test_install_appc {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080084 clone_repos "appc"
Victor Morales65deef22017-08-18 20:53:42 -050085 get_appc_images
86 install_appc
87
Victor Morales65deef22017-08-18 20:53:42 -050088 asserts_image_running openecomp/appc-image
Victor Morales65deef22017-08-18 20:53:42 -050089}
90
91if [ "$1" != '*' ]; then
92 unset covered_functions
93 covered_functions=$1
94fi
95main "${covered_functions[@]}"