blob: ebfd21de82cb42b3da07c7c19a6db40235b62e56 [file] [log] [blame]
Shashank Kumar Shankar9911e682017-08-17 15:43:17 -07001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/portal
5
6covered_functions=(
7"clone_all_portal_repos"
8"compile_all_portal_repos"
9"get_portal_images"
10"install_portal"
11)
12
13# test_clone_all_portal_repos() - Verify cloning of Portal source code
14function test_clone_all_portal_repos {
15 clone_all_portal_repos
16
Victor Moralesd618edd2017-09-18 14:57:12 -070017 asserts_file_exist $portal_src_folder/pom.xml
18 asserts_file_exist $portal_src_folder/ecompsdkos/LICENSE.txt
19 asserts_file_exist $portal_src_folder/dmaapbc/pom.xml
20 asserts_file_exist $portal_src_folder/sdk/LICENSE.txt
Shashank Kumar Shankar9911e682017-08-17 15:43:17 -070021}
22
23# test_compile_all_portal_repos() - Verify compiling of Portal source code
24function test_compile_all_portal_repos {
25 clone_all_portal_repos
26 compile_all_portal_repos
27
Victor Moralesd618edd2017-09-18 14:57:12 -070028 asserts_file_exist $portal_src_folder/ecomp-portal-BE-common/target/ecompportal-be-common.war
29 asserts_file_exist $portal_src_folder/ecomp-portal-BE-common-test/target/ecomp-portal-BE-common-test.jar
30 asserts_file_exist $portal_src_folder/ecomp-portal-BE-os/target/ecompportal-be-os.war
Shashank Kumar Shankar9911e682017-08-17 15:43:17 -070031}
32
33# test_get_portal_images() - Verify that Portal Docker images are retrieved or built properly
34function test_get_portal_images {
35 clone_all_portal_repos
36 get_portal_images
37
38 asserts_image portal-db
39 asserts_image portal-wms
40 asserts_image portal-apps
41 asserts_image mariadb
42}
43
44# test_install_portal() - Verify installation of Portal services
45function test_install_portal {
46 clone_all_portal_repos
47 install_mariadb
48 install_portal
49
50 asserts_image_running portal-db
51 asserts_image_running portal-wms
52 asserts_image_running portal-apps
53}
54
55if [ "$1" != '*' ]; then
56 unset covered_functions
57 covered_functions=$1
58fi
59main "${covered_functions[@]}"