summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/tests
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-08-16 13:44:28 -0500
committerVictor Morales <victor.morales@intel.com>2017-08-16 13:44:28 -0500
commit965126534574cb0377db6c8f7f7004c072ed403a (patch)
tree350525304295c68916d4196d8fc41bd88dac2c3c /bootstrap/vagrant-onap/tests
parenta39795202418582a6c1ce5ff77191c3acbf36bb3 (diff)
Implement test_install_policy UT
It was missed the Unit test that verifies the installation of policy services. This commit creates that method and also refactors some policy code Change-Id: I58f3f416efc096fc6199fd831bb63293b95157d2 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-Id: INT-23
Diffstat (limited to 'bootstrap/vagrant-onap/tests')
-rw-r--r--bootstrap/vagrant-onap/tests/test_policy25
1 files changed, 18 insertions, 7 deletions
diff --git a/bootstrap/vagrant-onap/tests/test_policy b/bootstrap/vagrant-onap/tests/test_policy
index 0fa338d9c..f5490a460 100644
--- a/bootstrap/vagrant-onap/tests/test_policy
+++ b/bootstrap/vagrant-onap/tests/test_policy
@@ -6,11 +6,10 @@ source /var/onap/policy
covered_functions=(
"clone_all_policy_repos"
"compile_all_policy_repos"
-"init_policy"
+"get_policy_images"
+"install_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
@@ -28,17 +27,29 @@ function test_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
+# test_get_policy_images() - Verify that Policy Docker images are retrieved properly
+function test_get_policy_images {
+ clone_all_policy_repos
+ get_policy_images
for image in os nexus db base drools pe; do
asserts_image onap/policy/policy-$image
done
}
+# test_install_policy() - Verify that Policy services are started properly
+function test_install_policy {
+ clone_all_policy_repos
+ get_policy_images
+ install_policy
+
+ for image in pe drools db nexus; do
+ asserts_image_running onap/policy/policy-$image
+ done
+}
+
if [ "$1" != '*' ]; then
unset covered_functions
covered_functions=$1
fi
-main "${covered_functions[@]}" \ No newline at end of file
+main "${covered_functions[@]}"