From d618eddd813e13b8c66db83dc5d0a16199715d54 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Mon, 18 Sep 2017 14:57:12 -0700 Subject: Rename variable for portal script The name of the variables of the portal script was using policy names which could result in conflicts with policy scripts. This change fixes that name convention. Change-Id: Ic3838a2e9292f23923c0b0c20dbd7726a83b3aee Signed-off-by: Victor Morales Issue-Id: INT-21 --- bootstrap/vagrant-onap/lib/portal | 26 ++++++++++++-------------- bootstrap/vagrant-onap/tests/test_portal | 14 +++++++------- 2 files changed, 19 insertions(+), 21 deletions(-) (limited to 'bootstrap/vagrant-onap') diff --git a/bootstrap/vagrant-onap/lib/portal b/bootstrap/vagrant-onap/lib/portal index 505bdde0c..998d6c075 100755 --- a/bootstrap/vagrant-onap/lib/portal +++ b/bootstrap/vagrant-onap/lib/portal @@ -4,26 +4,26 @@ set -o xtrace source /var/onap/functions -policy_src_folder=$git_src_folder/portal -policy_repos=("sdk") +portal_src_folder=$git_src_folder/portal +portal_repos=("sdk") # clone_all_portal_repos() - Function that clones Portal source repo. function clone_all_portal_repos { - clone_repo portal $policy_src_folder - clone_repo ecompsdkos $policy_src_folder/ecompsdkos - clone_repo "ui/dmaapbc" $policy_src_folder/dmaapbc + clone_repo portal $portal_src_folder + clone_repo ecompsdkos $portal_src_folder/ecompsdkos + clone_repo "ui/dmaapbc" $portal_src_folder/dmaapbc - for dirc in ${policy_repos[@]}; do - clone_repo portal/$dirc $policy_src_folder/$dirc + for dirc in ${portal_repos[@]}; do + clone_repo portal/$dirc $portal_src_folder/$dirc done } # compile_all_portal_repos() - Function that compiles Portal source repo. function compile_all_portal_repos { - compile_src $policy_src_folder + compile_src $portal_src_folder - for dirc in ${policy_repos[@]}; do - compile_src $policy_src_folder/$dirc + for dirc in ${portal_repos[@]}; do + compile_src $portal_src_folder/$dirc done } @@ -31,14 +31,12 @@ function compile_all_portal_repos { function _build_portal_images { install_maven - pushd $policy_src_folder/deliveries + pushd $portal_src_folder/deliveries chmod +x *.sh export MVN=$(which mvn) export GLOBAL_SETTINGS_FILE=/usr/share/maven3/conf/settings.xml export SETTINGS_FILE=$HOME/.m2/settings.xml bash build_portalapps_dockers.sh - compile_src $policy_src_folder/ecomp-portal-widget-ms - build_docker_image $policy_src_folder/ecomp-portal-widget-ms popd } @@ -64,7 +62,7 @@ function install_portal { docker rm -f ecompdb_portal docker rm -f 1610-1 - pushd $policy_src_folder/deliveries + pushd $portal_src_folder/deliveries mkdir -p /PROJECT/OpenSource/UbuntuEP/logs install_package unzip unzip -o etc.zip -d /PROJECT/OpenSource/UbuntuEP/ diff --git a/bootstrap/vagrant-onap/tests/test_portal b/bootstrap/vagrant-onap/tests/test_portal index d586b73f5..ebfd21de8 100644 --- a/bootstrap/vagrant-onap/tests/test_portal +++ b/bootstrap/vagrant-onap/tests/test_portal @@ -14,10 +14,10 @@ covered_functions=( function test_clone_all_portal_repos { clone_all_portal_repos - asserts_file_exist $policy_src_folder/pom.xml - asserts_file_exist $policy_src_folder/ecompsdkos/LICENSE.txt - asserts_file_exist $policy_src_folder/dmaapbc/pom.xml - asserts_file_exist $policy_src_folder/sdk/LICENSE.txt + asserts_file_exist $portal_src_folder/pom.xml + asserts_file_exist $portal_src_folder/ecompsdkos/LICENSE.txt + asserts_file_exist $portal_src_folder/dmaapbc/pom.xml + asserts_file_exist $portal_src_folder/sdk/LICENSE.txt } # test_compile_all_portal_repos() - Verify compiling of Portal source code @@ -25,9 +25,9 @@ function test_compile_all_portal_repos { clone_all_portal_repos compile_all_portal_repos - asserts_file_exist $policy_src_folder/ecomp-portal-BE-common/target/ecompportal-be-common.war - asserts_file_exist $policy_src_folder/ecomp-portal-BE-common-test/target/ecomp-portal-BE-common-test.jar - asserts_file_exist $policy_src_folder/ecomp-portal-BE-os/target/ecompportal-be-os.war + asserts_file_exist $portal_src_folder/ecomp-portal-BE-common/target/ecompportal-be-common.war + asserts_file_exist $portal_src_folder/ecomp-portal-BE-common-test/target/ecomp-portal-BE-common-test.jar + asserts_file_exist $portal_src_folder/ecomp-portal-BE-os/target/ecompportal-be-os.war } # test_get_portal_images() - Verify that Portal Docker images are retrieved or built properly -- cgit 1.2.3-korg