Victor Morales | 80ef0a4 | 2017-08-21 19:17:07 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/dcae |
| 5 | |
| 6 | covered_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 |
| 11 | function test_clone_all_dcae_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 12 | clone_repos "dcae" |
Victor Morales | 80ef0a4 | 2017-08-21 19:17:07 -0500 | [diff] [blame] | 13 | |
| 14 | asserts_file_exist $dcae_src_folder/apod/README.md |
| 15 | asserts_file_exist $dcae_src_folder/apod/analytics/pom.xml |
| 16 | asserts_file_exist $dcae_src_folder/apod/buildtools/LICENSE.txt |
| 17 | asserts_file_exist $dcae_src_folder/apod/cdap/LICENSE.txt |
| 18 | asserts_file_exist $dcae_src_folder/collectors/README.md |
| 19 | asserts_file_exist $dcae_src_folder/collectors/ves/pom.xml |
| 20 | asserts_file_exist $dcae_src_folder/controller/pom.xml |
| 21 | asserts_file_exist $dcae_src_folder/controller/analytics/pom.xml |
| 22 | asserts_file_exist $dcae_src_folder/dcae-inventory/pom.xml |
| 23 | asserts_file_exist $dcae_src_folder/demo/pom.xml |
| 24 | asserts_file_exist $dcae_src_folder/demo/startup/README.md |
| 25 | asserts_file_exist $dcae_src_folder/demo/startup/aaf/LICENSE.txt |
| 26 | asserts_file_exist $dcae_src_folder/demo/startup/controller/LICENSE.txt |
| 27 | asserts_file_exist $dcae_src_folder/demo/startup/message-router/LICENSE.txt |
| 28 | asserts_file_exist $dcae_src_folder/dmaapbc/pom.xml |
| 29 | asserts_file_exist $dcae_src_folder/operation/README.md |
| 30 | asserts_file_exist $dcae_src_folder/operation/utils/pom.xml |
Victor Morales | 21404d7 | 2017-10-20 13:18:26 -0700 | [diff] [blame] | 31 | asserts_file_exist $dcae_src_folder/orch-dispatcher/LICENSE.txt |
Victor Morales | 80ef0a4 | 2017-08-21 19:17:07 -0500 | [diff] [blame] | 32 | asserts_file_exist $dcae_src_folder/pgaas/LICENSE.txt |
| 33 | asserts_file_exist $dcae_src_folder/utils/README.md |
| 34 | asserts_file_exist $dcae_src_folder/utils/buildtools/LICENSE.txt |
| 35 | } |
| 36 | |
| 37 | # test_compile_all_dcae_repos() - Verify that the DCAE source code is compiled properly |
| 38 | function test_compile_all_dcae_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 39 | clone_repos "dcae" |
| 40 | compile_repos "dcae" |
Victor Morales | 80ef0a4 | 2017-08-21 19:17:07 -0500 | [diff] [blame] | 41 | |
| 42 | asserts_file_exist $dcae_src_folder/collectors/ves/target/VESCollector-1.1.0-SNAPSHOT.jar |
| 43 | |
| 44 | asserts_file_exist $dcae_src_folder/controller/analytics/dcae-analytics-cdap-common-model/target/dcae-analytics-cdap-common-model-1.1.0-SNAPSHOT.jar |
| 45 | |
| 46 | asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-core-model/target/dcae-controller-core-model-1.1.0-SNAPSHOT.jar |
| 47 | asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-core-utils/target/dcae-controller-core-utils-1.1.0-SNAPSHOT.jar |
| 48 | asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-operation-utils/target/dcae-controller-operation-utils-1.1.0-SNAPSHOT.jar |
| 49 | asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-platform-model/target/dcae-controller-platform-model-1.1.0-SNAPSHOT.jar |
| 50 | asserts_file_exist $dcae_src_folder/controller/dcae-controller-core/dcae-controller-platform-server/target/dcae-controller-platform-server-1.1.0-SNAPSHOT.jar |
| 51 | |
| 52 | 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 |
| 53 | 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 |
| 54 | 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 |
| 55 | 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 |
| 56 | 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 |
| 57 | |
| 58 | 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 |
| 59 | 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 |
| 60 | 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 |
| 61 | 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 |
| 62 | |
| 63 | 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 |
| 64 | 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 |
| 65 | 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 |
| 66 | 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 |
| 67 | 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 |
| 68 | 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 |
| 69 | |
| 70 | 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 |
| 71 | 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 |
| 72 | 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 |
| 73 | 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 |
| 74 | |
| 75 | asserts_file_exist $dcae_src_folder/dcae-inventory/target/dcae-inventory-1.1.0.jar |
| 76 | |
| 77 | asserts_file_exist $dcae_src_folder/demo/dcae-demo-controller/target/dcae-demo-controller-1.1.0-SNAPSHOT-runtime.zip |
| 78 | |
| 79 | asserts_file_exist $dcae_src_folder/dmaapbc/target/dcae_dmaapbc.jar |
| 80 | |
| 81 | asserts_file_exist $dcae_src_folder/operation/utils/operation-utils/target/operation-utils-1.1.0-SNAPSHOT.jar |
| 82 | } |
| 83 | |
| 84 | # test_get_dcae_images() - Function that verifies DCAE images are retrieved properly |
| 85 | function test_get_dcae_images { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 86 | clone_repos "dcae" |
| 87 | compile_repos "dcae" |
Victor Morales | 80ef0a4 | 2017-08-21 19:17:07 -0500 | [diff] [blame] | 88 | 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 |
| 97 | function test_install_dcae { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame^] | 98 | clone_repos "dcae" |
Victor Morales | 80ef0a4 | 2017-08-21 19:17:07 -0500 | [diff] [blame] | 99 | 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 | |
| 107 | if [ "$1" != '*' ]; then |
| 108 | unset covered_functions |
| 109 | covered_functions=$1 |
| 110 | fi |
| 111 | main "${covered_functions[@]}" |