blob: 0fa338d9c123113e7dcbd37f4e1c717349953cc0 [file] [log] [blame]
Shashank Kumar Shankarb249c8a2017-07-27 13:20:26 -07001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/policy
5
6covered_functions=(
7"clone_all_policy_repos"
8"compile_all_policy_repos"
9"init_policy"
10)
11
12src_folder=/opt/policy
13
14# test_clone_all_policy_repos() - Verify cloning of Policy source code
15function test_clone_all_policy_repos {
16 clone_all_policy_repos
17
18 for dirc in api common docker drools-applications drools-pdp engine gui pap pdp; do
19 asserts_file_exist policy/$dirc $src_folder/$dirc
20 done
21}
22
23# test_compile_all_policy_repos() - Verify compiling of Policy source code
24function test_compile_all_policy_repos {
25 clone_all_policy_repos
26 compile_all_policy_repos
27
28 asserts_file_exist $src_folder/drools-applications/controlloop/common/actors/actor.test/target/actor.test-1.1.0-SNAPSHOT.jar
29}
30
31# test_init_policy() - Verify Policy images are created or cloned
32function test_init_policy {
33 init_policy
34
35 for image in os nexus db base drools pe; do
36 asserts_image onap/policy/policy-$image
37 done
38}
39
40if [ "$1" != '*' ]; then
41 unset covered_functions
42 covered_functions=$1
43fi
44main "${covered_functions[@]}"