blob: 3c5400fa197d3822aff605c4400941e355794654 [file] [log] [blame]
Victor Morales80ef0a42017-08-21 19:17:07 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/dcae
5
6covered_functions=(
7"clone_all_dcae_repos" "compile_all_dcae_repos" "get_dcae_images" "install_dcae"
8)
9
10# test_clone_all_dcae_repos() - Verifies that can retrieve DCAE repositories properly
11function test_clone_all_dcae_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "dcae"
Victor Morales80ef0a42017-08-21 19:17:07 -050013
Victor Morales54646642017-12-08 11:57:42 -080014 asserts_file_exist ${src_folders[dcae]}/apod/README.md
15 asserts_file_exist ${src_folders[dcae]}/apod/analytics/pom.xml
16 asserts_file_exist ${src_folders[dcae]}/apod/buildtools/LICENSE.txt
17 asserts_file_exist ${src_folders[dcae]}/apod/cdap/LICENSE.txt
18 asserts_file_exist ${src_folders[dcae]}/collectors/README.md
19 asserts_file_exist ${src_folders[dcae]}/collectors/ves/pom.xml
20 asserts_file_exist ${src_folders[dcae]}/controller/pom.xml
21 asserts_file_exist ${src_folders[dcae]}/controller/analytics/pom.xml
22 asserts_file_exist ${src_folders[dcae]}/dcae-inventory/pom.xml
23 asserts_file_exist ${src_folders[dcae]}/demo/pom.xml
24 asserts_file_exist ${src_folders[dcae]}/demo/startup/README.md
25 asserts_file_exist ${src_folders[dcae]}/demo/startup/aaf/LICENSE.txt
26 asserts_file_exist ${src_folders[dcae]}/demo/startup/controller/LICENSE.txt
27 asserts_file_exist ${src_folders[dcae]}/demo/startup/message-router/LICENSE.txt
28 asserts_file_exist ${src_folders[dcae]}/dmaapbc/pom.xml
29 asserts_file_exist ${src_folders[dcae]}/operation/README.md
30 asserts_file_exist ${src_folders[dcae]}/operation/utils/pom.xml
31 asserts_file_exist ${src_folders[dcae]}/orch-dispatcher/LICENSE.txt
32 asserts_file_exist ${src_folders[dcae]}/pgaas/LICENSE.txt
33 asserts_file_exist ${src_folders[dcae]}/utils/README.md
34 asserts_file_exist ${src_folders[dcae]}/utils/buildtools/LICENSE.txt
Victor Morales80ef0a42017-08-21 19:17:07 -050035}
36
37# test_compile_all_dcae_repos() - Verify that the DCAE source code is compiled properly
38function test_compile_all_dcae_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080039 clone_repos "dcae"
40 compile_repos "dcae"
Victor Morales80ef0a42017-08-21 19:17:07 -050041
Victor Morales54646642017-12-08 11:57:42 -080042 asserts_file_exist ${src_folders[dcae]}/collectors/ves/target/VESCollector-1.1.0-SNAPSHOT.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050043
Victor Morales54646642017-12-08 11:57:42 -080044 asserts_file_exist ${src_folders[dcae]}/controller/analytics/dcae-analytics-cdap-common-model/target/dcae-analytics-cdap-common-model-1.1.0-SNAPSHOT.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050045
Victor Morales54646642017-12-08 11:57:42 -080046 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-core-model/target/dcae-controller-core-model-1.1.0-SNAPSHOT.jar
47 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-core-utils/target/dcae-controller-core-utils-1.1.0-SNAPSHOT.jar
48 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-operation-utils/target/dcae-controller-operation-utils-1.1.0-SNAPSHOT.jar
49 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-platform-model/target/dcae-controller-platform-model-1.1.0-SNAPSHOT.jar
50 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-platform-server/target/dcae-controller-platform-server-1.1.0-SNAPSHOT.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050051
Victor Morales54646642017-12-08 11:57:42 -080052 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/target/dcae-controller-service-dmaap-drsub-manager-1.1.0-SNAPSHOT.jar
53 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/target/dcae-controller-service-dmaap-drsub-model-1.1.0-SNAPSHOT.jar
54 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/target/dcae-controller-service-standardeventcollector-manager-1.1.0-SNAPSHOT.jar
55 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/target/dcae-controller-service-standardeventcollector-model-1.1.0-SNAPSHOT.jar
56 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-storage-postgres-model/target/dcae-controller-service-storage-postgres-model-1.1.0-SNAPSHOT.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050057
Victor Morales54646642017-12-08 11:57:42 -080058 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/target/dcae-controller-service-cdap-adaptor-1.1.0-SNAPSHOT.jar
59 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/target/dcae-controller-service-cdap-cluster-manager-1.1.0-SNAPSHOT.jar
60 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/target/dcae-controller-service-cdap-cluster-model-1.1.0-SNAPSHOT.jar
61 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-model/target/dcae-controller-service-cdap-model-1.1.0-SNAPSHOT.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050062
Victor Morales54646642017-12-08 11:57:42 -080063 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/target/dcae-controller-service-common-docker-manager-1.1.0-SNAPSHOT.jar
64 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/target/dcae-controller-service-common-docker-model-1.1.0-SNAPSHOT.jar
65 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/target/dcae-controller-service-docker-adaptor-1.1.0-SNAPSHOT.jar
66 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/target/dcae-controller-service-docker-host-manager-1.1.0-SNAPSHOT.jar
67 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/target/dcae-controller-service-docker-host-model-1.1.0-SNAPSHOT.jar
68 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-docker-model/target/dcae-controller-service-docker-model-1.1.0-SNAPSHOT.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050069
Victor Morales54646642017-12-08 11:57:42 -080070 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/target/dcae-controller-service-common-vm-manager-1.1.0-SNAPSHOT.jar
71 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/target/dcae-controller-service-common-vm-model-1.1.0-SNAPSHOT.jar
72 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/target/dcae-controller-service-vm-adaptor-1.1.0-SNAPSHOT.jar
73 asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-vm/dcae-controller-service-vm-model/target/dcae-controller-service-vm-model-1.1.0-SNAPSHOT.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050074
Victor Morales54646642017-12-08 11:57:42 -080075 asserts_file_exist ${src_folders[dcae]}/dcae-inventory/target/dcae-inventory-1.1.0.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050076
Victor Morales54646642017-12-08 11:57:42 -080077 asserts_file_exist ${src_folders[dcae]}/demo/dcae-demo-controller/target/dcae-demo-controller-1.1.0-SNAPSHOT-runtime.zip
Victor Morales80ef0a42017-08-21 19:17:07 -050078
Victor Morales54646642017-12-08 11:57:42 -080079 asserts_file_exist ${src_folders[dcae]}/dmaapbc/target/dcae_dmaapbc.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050080
Victor Morales54646642017-12-08 11:57:42 -080081 asserts_file_exist ${src_folders[dcae]}/operation/utils/operation-utils/target/operation-utils-1.1.0-SNAPSHOT.jar
Victor Morales80ef0a42017-08-21 19:17:07 -050082}
83
84# test_get_dcae_images() - Function that verifies DCAE images are retrieved properly
85function test_get_dcae_images {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080086 clone_repos "dcae"
87 compile_repos "dcae"
Victor Morales80ef0a42017-08-21 19:17:07 -050088 get_dcae_images
89
90 asserts_image openecomp/dcae-dmaapbc
91 #asserts_image dcae/orch-dispatcher
92 asserts_image dcae-controller
93 asserts_image dcae-inventory
94}
95
96# test_install_dcae() - Function that verifies that DCAE services are up and running
97function test_install_dcae {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080098 clone_repos "dcae"
Victor Morales80ef0a42017-08-21 19:17:07 -050099 compile_all_dcae_repos
100 get_dcae_images
101 install_dcae
102
103 dcae_image=`docker images | grep dcae-controller | awk '{print $1 ":" $2}'`
104 asserts_image_running $dcae_image
105}
106
107if [ "$1" != '*' ]; then
108 unset covered_functions
109 covered_functions=$1
110fi
111main "${covered_functions[@]}"