blob: 2290f16a2b04a38b067545cb54b267765129c2eb [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 {
12 clone_all_appc_repos
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
19function test_compile_all_appc_repos {
20 clone_all_appc_repos
21 compile_all_appc_repos
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
24 asserts_file_exist $appc_src_folder/appc-adapters/$adapter/$adapter-bundle/target/$adapter-bundle-1.1.0-SNAPSHOT.jar
25 asserts_file_exist $appc_src_folder/appc-adapters/$adapter/$adapter-features/target/$adapter-features-1.1.0-SNAPSHOT.jar
26 if [[ "$adapter" == "appc-netconf-adapter" ]]; then
27 asserts_file_exist $appc_src_folder/appc-adapters/$adapter/appc-netconf-installer/target/$adapter-1.1.0-SNAPSHOT.zip
28 else
29 asserts_file_exist $appc_src_folder/appc-adapters/$adapter/$adapter-installer/target/$adapter-1.1.0-SNAPSHOT.zip
30 fi
31 done
32 asserts_file_exist $appc_src_folder/appc-adapters/appc-dmaap-adapter/appc-message-adapter-api/target/appc-message-adapter-api-1.1.0-SNAPSHOT.jar
33 asserts_file_exist $appc_src_folder/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/target/appc-message-adapter-factory-1.1.0-SNAPSHOT.jar
34 asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/target/appc-ssh-adapter-api-1.1.0-SNAPSHOT.jar
35 asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-features/target/appc-ssh-adapter-features-1.1.0-SNAPSHOT.jar
36 asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/target/appc-ssh-adapter-sshd-1.1.0-SNAPSHOT.jar
37 asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/target/appc-ssh-adapter-tests-1.1.0-SNAPSHOT.jar
38
Victor Morales664e6e92017-09-14 12:11:23 -070039 for component in appc-event-listener appc-oam appc-provider; do
Victor Morales65deef22017-08-18 20:53:42 -050040 asserts_file_exist $appc_src_folder/$component/$component-bundle/target/$component-bundle-1.1.0-SNAPSHOT.jar
41 asserts_file_exist $appc_src_folder/$component/$component-features/target/$component-features-1.1.0-SNAPSHOT.jar
42 asserts_file_exist $appc_src_folder/$component/$component-installer/target/$component-1.1.0-SNAPSHOT.zip
43 done
44 for component in appc-oam appc-provider; do
45 asserts_file_exist $appc_src_folder/$component/$component-model/target/$component-model-1.1.0-SNAPSHOT.jar
46 done
47
Victor Morales65deef22017-08-18 20:53:42 -050048 asserts_file_exist $appc_src_folder/appc-common/target/appc-common-1.1.0-SNAPSHOT.jar
49
50 asserts_file_exist $appc_src_folder/appc-dg/appc-dg-shared/appc-dg-dependency-model/target/appc-dg-dependency-model-1.1.0-SNAPSHOT.jar
51 asserts_file_exist $appc_src_folder/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/target/appc-dg-domain-model-lib-1.1.0-SNAPSHOT.jar
52
53 asserts_file_exist $appc_src_folder/appc-dispatcher/appc-command-executor/appc-command-executor-api/target/appc-command-executor-api-1.1.0-SNAPSHOT.jar
54 asserts_file_exist $appc_src_folder/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/target/appc-data-access-lib-1.1.0-SNAPSHOT.jar
55 asserts_file_exist $appc_src_folder/appc-dispatcher/appc-dispatcher-common/domain-model-lib/target/domain-model-lib-1.1.0-SNAPSHOT.jar
56 asserts_file_exist $appc_src_folder/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/target/execution-queue-management-lib-1.1.0-SNAPSHOT.jar
57 asserts_file_exist $appc_src_folder/appc-dispatcher/appc-license-manager/appc-license-manager-api/target/appc-license-manager-api-1.1.0-SNAPSHOT.jar
58 asserts_file_exist $appc_src_folder/appc-dispatcher/appc-request-handler/appc-request-handler-api/target/appc-request-handler-api-1.1.0-SNAPSHOT.jar
59
60
61 asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-api/target/appc-lifecycle-management-api-1.1.0-SNAPSHOT.jar
62 asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-core/target/appc-lifecycle-management-core-1.1.0-SNAPSHOT.jar
63 asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-features/target/appc-lifecycle-management-features-1.1.0-SNAPSHOT.jar
64 asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-installer/target/appc-lifecycle-management-1.1.0-SNAPSHOT.zip
65 asserts_file_exist $appc_src_folder/appc-lifecycle-management/state-machine-lib/target/state-machine-lib-1.1.0-SNAPSHOT.jar
66
67 asserts_file_exist $appc_src_folder/appc-metric/appc-metric-bundle/target/appc-metric-bundle-1.1.0-SNAPSHOT.jar
68
69 asserts_file_exist $appc_src_folder/deployment/platform-logic/installer/target/platform-logic-installer-1.1.0-SNAPSHOT.zip
70}
71
72# test_get_appc_images() - Verify that APPC Docker images can be retrieved
73function test_get_appc_images {
74 clone_all_appc_repo
75 get_appc_images
76
77 asserts_image openecomp/appc-image
78}
79
80# test_install_appc() - Verify that the APPC Docker images are up and running
81function test_install_appc {
82 clone_all_appc_repos
83 get_appc_images
84 install_appc
85
Victor Morales65deef22017-08-18 20:53:42 -050086 asserts_image_running openecomp/appc-image
Victor Morales65deef22017-08-18 20:53:42 -050087}
88
89if [ "$1" != '*' ]; then
90 unset covered_functions
91 covered_functions=$1
92fi
93main "${covered_functions[@]}"