blob: 8bf93837fce0690b1c23c13502e51d5702db997b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#!/bin/bash
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2017-2018
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#############################################################################
source /var/onap_tests/_test_base
source /var/onap/portal
covered_functions=(
"clone_all_portal_repos"
"compile_all_portal_repos"
"get_portal_images"
"install_portal"
)
# test_clone_all_portal_repos() - Verify cloning of Portal source code
function test_clone_all_portal_repos {
clone_all_portal_repos
asserts_file_exist ${src_folders[portal]}/pom.xml
asserts_file_exist ${src_folders[portal]}/ecompsdkos/LICENSE.txt
asserts_file_exist ${src_folders[portal]}/dmaapbc/pom.xml
asserts_file_exist ${src_folders[portal]}/sdk/LICENSE.txt
}
# test_compile_all_portal_repos() - Verify compiling of Portal source code
function test_compile_all_portal_repos {
clone_all_portal_repos
compile_all_portal_repos
asserts_file_exist ${src_folders[portal]}/ecomp-portal-BE-common/target/ecompportal-be-common.war
asserts_file_exist ${src_folders[portal]}/ecomp-portal-BE-common-test/target/ecomp-portal-BE-common-test.jar
asserts_file_exist ${src_folders[portal]}/ecomp-portal-BE-os/target/ecompportal-be-os.war
}
# test_get_portal_images() - Verify that Portal Docker images are retrieved or built properly
function test_get_portal_images {
clone_all_portal_repos
get_portal_images
asserts_image portal-db
asserts_image portal-wms
asserts_image portal-apps
asserts_image mariadb
}
# test_install_portal() - Verify installation of Portal services
function test_install_portal {
clone_all_portal_repos
install_mariadb
install_portal
asserts_image_running portal-db
asserts_image_running portal-wms
asserts_image_running portal-apps
}
if [ "$1" != '*' ]; then
unset covered_functions
covered_functions=$1
fi
main "${covered_functions[@]}"
|