summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/tests
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-08-22 06:07:18 +0000
committerGerrit Code Review <gerrit@onap.org>2017-08-22 06:07:18 +0000
commit9fd0a310dc68031a2feeb397ee7a720a0381fece (patch)
tree2bd8a47a8c1ba85daf73bfbac047f72120f9e985 /bootstrap/vagrant-onap/tests
parentecc8354f5c586713650a4d2eb1f7c94ddcb4665a (diff)
parent80ef0a4494b2b86c96efce2c2c16c26862e68444 (diff)
Merge "Add DCAE UTs"
Diffstat (limited to 'bootstrap/vagrant-onap/tests')
-rw-r--r--bootstrap/vagrant-onap/tests/test_dcae110
1 files changed, 110 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/tests/test_dcae b/bootstrap/vagrant-onap/tests/test_dcae
new file mode 100644
index 000000000..104cadd12
--- /dev/null
+++ b/bootstrap/vagrant-onap/tests/test_dcae
@@ -0,0 +1,110 @@
+#!/bin/bash
+
+source /var/onap_tests/_test_base
+source /var/onap/dcae
+
+covered_functions=(
+"clone_all_dcae_repos" "compile_all_dcae_repos" "get_dcae_images" "install_dcae"
+)
+
+# test_clone_all_dcae_repos() - Verifies that can retrieve DCAE repositories properly
+function test_clone_all_dcae_repos {
+ clone_all_dcae_repos
+
+ asserts_file_exist $dcae_src_folder/apod/README.md
+ asserts_file_exist $dcae_src_folder/apod/analytics/pom.xml
+ asserts_file_exist $dcae_src_folder/apod/buildtools/LICENSE.txt
+ asserts_file_exist $dcae_src_folder/apod/cdap/LICENSE.txt
+ asserts_file_exist $dcae_src_folder/collectors/README.md
+ asserts_file_exist $dcae_src_folder/collectors/ves/pom.xml
+ asserts_file_exist $dcae_src_folder/controller/pom.xml
+ asserts_file_exist $dcae_src_folder/controller/analytics/pom.xml
+ asserts_file_exist $dcae_src_folder/dcae-inventory/pom.xml
+ asserts_file_exist $dcae_src_folder/demo/pom.xml
+ asserts_file_exist $dcae_src_folder/demo/startup/README.md
+ asserts_file_exist $dcae_src_folder/demo/startup/aaf/LICENSE.txt
+ asserts_file_exist $dcae_src_folder/demo/startup/controller/LICENSE.txt
+ asserts_file_exist $dcae_src_folder/demo/startup/message-router/LICENSE.txt
+ asserts_file_exist $dcae_src_folder/dmaapbc/pom.xml
+ asserts_file_exist $dcae_src_folder/operation/README.md
+ asserts_file_exist $dcae_src_folder/operation/utils/pom.xml
+ asserts_file_exist $dcae_src_folder/pgaas/LICENSE.txt
+ asserts_file_exist $dcae_src_folder/utils/README.md
+ asserts_file_exist $dcae_src_folder/utils/buildtools/LICENSE.txt
+}
+
+# test_compile_all_dcae_repos() - Verify that the DCAE source code is compiled properly
+function test_compile_all_dcae_repos {
+ clone_all_dcae_repos
+ compile_all_dcae_repos
+
+ asserts_file_exist $dcae_src_folder/collectors/ves/target/VESCollector-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $dcae_src_folder/controller/analytics/dcae-analytics-cdap-common-model/target/dcae-analytics-cdap-common-model-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-core-model/target/dcae-controller-core-model-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-core-utils/target/dcae-controller-core-utils-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-operation-utils/target/dcae-controller-operation-utils-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-platform-model/target/dcae-controller-platform-model-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-platform-server/target/dcae-controller-platform-server-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/target/dcae-controller-service-standardeventcollector-manager-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/target/dcae-controller-service-standardeventcollector-model-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service/dcae-controller-service-storage-postgres-model/target/dcae-controller-service-storage-postgres-model-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/target/dcae-controller-service-cdap-adaptor-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-model/target/dcae-controller-service-cdap-model-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/target/dcae-controller-service-docker-adaptor-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service-docker/dcae-controller-service-docker-model/target/dcae-controller-service-docker-model-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/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
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/target/dcae-controller-service-vm-adaptor-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $dcae_src_folder/controller/dcae-controller-service-vm/dcae-controller-service-vm-model/target/dcae-controller-service-vm-model-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $dcae_src_folder/dcae-inventory/target/dcae-inventory-1.1.0.jar
+
+ asserts_file_exist $dcae_src_folder/demo/dcae-demo-controller/target/dcae-demo-controller-1.1.0-SNAPSHOT-runtime.zip
+
+ asserts_file_exist $dcae_src_folder/dmaapbc/target/dcae_dmaapbc.jar
+
+ asserts_file_exist $dcae_src_folder/operation/utils/operation-utils/target/operation-utils-1.1.0-SNAPSHOT.jar
+}
+
+# test_get_dcae_images() - Function that verifies DCAE images are retrieved properly
+function test_get_dcae_images {
+ clone_all_dcae_repos
+ compile_all_dcae_repos
+ get_dcae_images
+
+ asserts_image openecomp/dcae-dmaapbc
+ #asserts_image dcae/orch-dispatcher
+ asserts_image dcae-controller
+ asserts_image dcae-inventory
+}
+
+# test_install_dcae() - Function that verifies that DCAE services are up and running
+function test_install_dcae {
+ clone_all_dcae_repos
+ compile_all_dcae_repos
+ get_dcae_images
+ install_dcae
+
+ dcae_image=`docker images | grep dcae-controller | awk '{print $1 ":" $2}'`
+ asserts_image_running $dcae_image
+}
+
+if [ "$1" != '*' ]; then
+ unset covered_functions
+ covered_functions=$1
+fi
+main "${covered_functions[@]}"