blob: 0d46ef47d4ef446ed452c38853c2bf937c3a1c9b [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
39 for component in appc-asdc-listener appc-event-listener appc-oam appc-provider; do
40 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
48 asserts_file_exist $appc_src_folder/appc-asdc-listener/appc-yang-generator/target/appc-yang-generator-1.1.0-SNAPSHOT.jar
49
50 asserts_file_exist $appc_src_folder/appc-common/target/appc-common-1.1.0-SNAPSHOT.jar
51
52 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
53 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
54
55 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
56 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
57 asserts_file_exist $appc_src_folder/appc-dispatcher/appc-dispatcher-common/domain-model-lib/target/domain-model-lib-1.1.0-SNAPSHOT.jar
58 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
59 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
60 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
61
62
63 asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-api/target/appc-lifecycle-management-api-1.1.0-SNAPSHOT.jar
64 asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-core/target/appc-lifecycle-management-core-1.1.0-SNAPSHOT.jar
65 asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-features/target/appc-lifecycle-management-features-1.1.0-SNAPSHOT.jar
66 asserts_file_exist $appc_src_folder/appc-lifecycle-management/appc-lifecycle-management-installer/target/appc-lifecycle-management-1.1.0-SNAPSHOT.zip
67 asserts_file_exist $appc_src_folder/appc-lifecycle-management/state-machine-lib/target/state-machine-lib-1.1.0-SNAPSHOT.jar
68
69 asserts_file_exist $appc_src_folder/appc-metric/appc-metric-bundle/target/appc-metric-bundle-1.1.0-SNAPSHOT.jar
70
71 asserts_file_exist $appc_src_folder/deployment/platform-logic/installer/target/platform-logic-installer-1.1.0-SNAPSHOT.zip
72}
73
74# test_get_appc_images() - Verify that APPC Docker images can be retrieved
75function test_get_appc_images {
76 clone_all_appc_repo
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
83function test_install_appc {
84 clone_all_appc_repos
85 get_appc_images
86 install_appc
87
88 asserts_image_running openecomp/dgbuilder-sdnc-image
89 asserts_image_running openecomp/appc-image
90 asserts_image_running mysql/mysql-server:5.6
91}
92
93if [ "$1" != '*' ]; then
94 unset covered_functions
95 covered_functions=$1
96fi
97main "${covered_functions[@]}"