summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap/vagrant-onap/lib/policy14
-rw-r--r--bootstrap/vagrant-onap/tests/test_policy58
2 files changed, 59 insertions, 13 deletions
diff --git a/bootstrap/vagrant-onap/lib/policy b/bootstrap/vagrant-onap/lib/policy
index 5b3e58109..ce3405614 100755
--- a/bootstrap/vagrant-onap/lib/policy
+++ b/bootstrap/vagrant-onap/lib/policy
@@ -4,27 +4,27 @@ set -o xtrace
source /var/onap/functions
-src_folder=$git_src_folder/policy
+policy_src_folder=$git_src_folder/policy
policy_repos=("api" "common" "docker" "drools-applications" "drools-pdp" "engine" "gui" "pap" "pdp")
# clone_all_policy_repos() - Function that clones Policy source repo.
function clone_all_policy_repos {
for dirc in ${policy_repos[@]}; do
- clone_repo policy/$dirc $src_folder/$dirc
+ clone_repo policy/$dirc $policy_src_folder/$dirc
done
}
# compile_all_policy_repos() - Function that compiles Policy source repo.
function compile_all_policy_repos {
- for dirc in ${aai_repos[@]}; do
- compile_src $src_folder/$dirc
+ for dirc in ${policy_repos[@]}; do
+ compile_src $policy_src_folder/$dirc
done
}
# _build_policy_images() - Function that build Policy docker images from source code
function _build_policy_images {
- compile_src $src_folder/docker
- pushd $src_folder/docker
+ compile_src $policy_src_folder/docker
+ pushd $policy_src_folder/docker
install_maven
mvn prepare-package
cp -r target/policy-pe/* policy-pe/
@@ -48,7 +48,7 @@ function get_policy_images {
# install_policy() - Function that clones and installs the Policy services from source code
function install_policy {
- pushd $src_folder/docker
+ pushd $policy_src_folder/docker
chmod +x config/drools/drools-tweaks.sh
echo $IP_ADDRESS > config/pe/ip_addr.txt
install_docker_compose
diff --git a/bootstrap/vagrant-onap/tests/test_policy b/bootstrap/vagrant-onap/tests/test_policy
index f5490a460..d7ed98df6 100644
--- a/bootstrap/vagrant-onap/tests/test_policy
+++ b/bootstrap/vagrant-onap/tests/test_policy
@@ -14,17 +14,63 @@ covered_functions=(
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
+ asserts_file_exist $policy_src_folder/api/pom.xml
+ asserts_file_exist $policy_src_folder/common/pom.xml
+ asserts_file_exist $policy_src_folder/docker/pom.xml
+ asserts_file_exist $policy_src_folder/drools-applications/pom.xml
+ asserts_file_exist $policy_src_folder/drools-pdp/pom.xml
+ asserts_file_exist $policy_src_folder/engine/pom.xml
+ asserts_file_exist $policy_src_folder/gui/pom.xml
+ asserts_file_exist $policy_src_folder/pap/pom.xml
+ asserts_file_exist $policy_src_folder/pdp/pom.xml
}
# 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
+# 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
+ asserts_file_exist $policy_src_folder/common/common-logging/target/ONAP-Logging-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/common/integrity-audit/target/integrity-audit-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/common/integrity-monitor/target/integrity-monitor-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/common/site-manager/target/site-manager-1.1.0-SNAPSHOT.jar
+ for actor in appc mso test vfc; do
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/common/actors/actor.$actor/target/actor.$actor-1.1.0-SNAPSHOT.jar
+ done
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/common/actors/actorServiceProvider/target/actorServiceProvider-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/common/eventmanager/target/eventmanager-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/common/guard/target/guard-1.1.0-SNAPSHOT.jar
+ for module in aai appc events mso rest sdc trafficgenerator vfc; do
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/common/model-impl/$module/target/$module-1.1.0-SNAPSHOT.jar
+ done
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/common/policy-yaml/target/policy-yaml-1.1.0-SNAPSHOT.jar
+ for package in apps artifacts; do
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/packages/$package/target/$package-1.1.0-SNAPSHOT.zip
+ done
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/packages/basex/target/basex-1.1.0-SNAPSHOT.tar.gz
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/templates/template.demo/target/template.demo-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/target/archetype-cl-legacy-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/drools-applications/controlloop/templates/template.demo.v1.0.0/template.demo/target/demo-1.1.0-SNAPSHOT.jar
+ for feature in eelf healthcheck session-persistence; do
+ asserts_file_exist $policy_src_folder/drools-pdp/feature-$feature/target/feature-$feature-1.1.0-SNAPSHOT.jar
+ done
+ asserts_file_exist $policy_src_folder/drools-pdp/packages/base/target/base-1.1.0-SNAPSHOT.tar.gz
+ asserts_file_exist $policy_src_folder/drools-pdp/packages/install/target/install-drools-1.1.0-SNAPSHOT.zip
+ for policy in core endpoints management utils; do
+ asserts_file_exist $policy_src_folder/drools-pdp/policy-$policy/target/policy-$policy-1.1.0-SNAPSHOT.jar
+ done
+ for engine in BRMSGateway LogParser ONAP-PDP ONAP-XACML ONAP-REST; do
+ asserts_file_exist $policy_src_folder/engine/$engine/target/$engine-1.1.0-SNAPSHOT.jar
+ done
+ for engine in ONAP-PAP-REST ONAP-PDP-REST ONAP-SDK-APP; do
+ asserts_file_exist $policy_src_folder/engine/$engine/target/$engine-1.1.0-SNAPSHOT.war
+ done
+ asserts_file_exist $policy_src_folder/engine/packages/base/target/base-1.1.0-SNAPSHOT.tar.gz
+ asserts_file_exist $policy_src_folder/engine/packages/install/target/install-1.1.0-SNAPSHOT.zip
+ asserts_file_exist $policy_src_folder/engine/POLICY-SDK-APP/target/POLICY-SDK-APP-1.1.0-SNAPSHOT.war
+ asserts_file_exist $policy_src_folder/engine/PolicyEngineAPI/target/PolicyEngineAPI-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/engine/PolicyEngineClient/target/PolicyEngineClient-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $policy_src_folder/engine/PolicyEngineUtils/target/PolicyEngineUtils-1.1.0-SNAPSHOT.jar
}
# test_get_policy_images() - Verify that Policy Docker images are retrieved properly