blob: f567d7f1bc9453e79ad976cff55032ab9463a3bb [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
Victor Morales54646642017-12-08 11:57:42 -080014 asserts_file_exist ${src_folders[appc]}/pom.xml
15 asserts_file_exist ${src_folders[appc]}/deployment/pom.xml
Victor Morales65deef22017-08-18 20:53:42 -050016}
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 Morales54646642017-12-08 11:57:42 -080024 asserts_file_exist ${src_folders[appc]}/appc-adapters/$adapter/$adapter-bundle/target/$adapter-bundle-*-SNAPSHOT.jar
25 asserts_file_exist ${src_folders[appc]}/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 Morales54646642017-12-08 11:57:42 -080027 asserts_file_exist ${src_folders[appc]}/appc-adapters/$adapter/appc-netconf-installer/target/$adapter-*-SNAPSHOT.zip
Victor Morales65deef22017-08-18 20:53:42 -050028 else
Victor Morales54646642017-12-08 11:57:42 -080029 asserts_file_exist ${src_folders[appc]}/appc-adapters/$adapter/$adapter-installer/target/$adapter-*-SNAPSHOT.zip
Victor Morales65deef22017-08-18 20:53:42 -050030 fi
31 done
Victor Morales54646642017-12-08 11:57:42 -080032 asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-dmaap-adapter/appc-message-adapter-api/target/appc-message-adapter-api-*-SNAPSHOT.jar
33 asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/target/appc-message-adapter-factory-*-SNAPSHOT.jar
34 asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/target/appc-ssh-adapter-api-*-SNAPSHOT.jar
35 asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-features/target/appc-ssh-adapter-features-*-SNAPSHOT.jar
36 asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/target/appc-ssh-adapter-sshd-*-SNAPSHOT.jar
37 asserts_file_exist ${src_folders[appc]}/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
Victor Morales54646642017-12-08 11:57:42 -080041 asserts_file_exist ${src_folders[appc]}/$component/$component-bundle/target/$component-bundle-*-SNAPSHOT.jar
42 asserts_file_exist ${src_folders[appc]}/$component/$component-features/target/$component-features-*-SNAPSHOT.jar
43 asserts_file_exist ${src_folders[appc]}/$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
Victor Morales54646642017-12-08 11:57:42 -080047 asserts_file_exist ${src_folders[appc]}/$component/$component-model/target/$component-model-*-SNAPSHOT.jar
Victor Morales65deef22017-08-18 20:53:42 -050048 done
49
Victor Morales54646642017-12-08 11:57:42 -080050 asserts_file_exist ${src_folders[appc]}/appc-common/target/appc-common-*-SNAPSHOT.jar
Victor Morales65deef22017-08-18 20:53:42 -050051
Victor Morales54646642017-12-08 11:57:42 -080052 asserts_file_exist ${src_folders[appc]}/appc-dg/appc-dg-shared/appc-dg-dependency-model/target/appc-dg-dependency-model-*-SNAPSHOT.jar
53 asserts_file_exist ${src_folders[appc]}/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 Morales54646642017-12-08 11:57:42 -080055 asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-command-executor/appc-command-executor-api/target/appc-command-executor-api-*-SNAPSHOT.jar
56 asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/target/appc-data-access-lib-*-SNAPSHOT.jar
57 asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-dispatcher-common/domain-model-lib/target/domain-model-lib-*-SNAPSHOT.jar
58 asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/target/execution-queue-management-lib-*-SNAPSHOT.jar
59 asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-license-manager/appc-license-manager-api/target/appc-license-manager-api-*-SNAPSHOT.jar
60 asserts_file_exist ${src_folders[appc]}/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 Morales54646642017-12-08 11:57:42 -080063 #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/appc-lifecycle-management-api/target/appc-lifecycle-management-api-*-SNAPSHOT.jar
64 #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/appc-lifecycle-management-core/target/appc-lifecycle-management-core-*-SNAPSHOT.jar
65 #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/appc-lifecycle-management-features/target/appc-lifecycle-management-features-*-SNAPSHOT.jar
66 #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/appc-lifecycle-management-installer/target/appc-lifecycle-management-*-SNAPSHOT.zip
67 #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/state-machine-lib/target/state-machine-lib-*-SNAPSHOT.jar
Victor Morales65deef22017-08-18 20:53:42 -050068
Victor Morales54646642017-12-08 11:57:42 -080069 asserts_file_exist ${src_folders[appc]}/appc-metric/appc-metric-bundle/target/appc-metric-bundle-*-SNAPSHOT.jar
Victor Morales65deef22017-08-18 20:53:42 -050070
Victor Morales54646642017-12-08 11:57:42 -080071 asserts_file_exist ${src_folders[appc]}/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[@]}"