summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-07-27 13:20:26 -0700
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-07-27 13:20:49 -0700
commitb249c8a7388fdefbbed9caebe0d15e199c618b7b (patch)
treecd743ae108a30d81dc708a90adc8b1526b6a43a6 /bootstrap
parentdd074806ad51761392a9cca3f1f04fbbebd3de22 (diff)
Add tests for Policy repos
Add tests for policy repository cloning and compiling. Change-Id: I292ae77cd808f04ab9a4e666af0588fff7912879 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/vagrant-onap/tests/test_policy44
1 files changed, 44 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/tests/test_policy b/bootstrap/vagrant-onap/tests/test_policy
new file mode 100644
index 000000000..0fa338d9c
--- /dev/null
+++ b/bootstrap/vagrant-onap/tests/test_policy
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+source /var/onap_tests/_test_base
+source /var/onap/policy
+
+covered_functions=(
+"clone_all_policy_repos"
+"compile_all_policy_repos"
+"init_policy"
+)
+
+src_folder=/opt/policy
+
+# test_clone_all_policy_repos() - Verify cloning of Policy source code
+function test_clone_all_policy_repos {
+ clone_all_policy_repos
+
+ for dirc in api common docker drools-applications drools-pdp engine gui pap pdp; do
+ asserts_file_exist policy/$dirc $src_folder/$dirc
+ done
+}
+
+# test_compile_all_policy_repos() - Verify compiling of Policy source code
+function test_compile_all_policy_repos {
+ clone_all_policy_repos
+ compile_all_policy_repos
+
+ asserts_file_exist $src_folder/drools-applications/controlloop/common/actors/actor.test/target/actor.test-1.1.0-SNAPSHOT.jar
+}
+
+# test_init_policy() - Verify Policy images are created or cloned
+function test_init_policy {
+ init_policy
+
+ for image in os nexus db base drools pe; do
+ asserts_image onap/policy/policy-$image
+ done
+}
+
+if [ "$1" != '*' ]; then
+ unset covered_functions
+ covered_functions=$1
+fi
+main "${covered_functions[@]}" \ No newline at end of file