aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/_common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kud/tests/_common.sh')
-rwxr-xr-xkud/tests/_common.sh42
1 files changed, 31 insertions, 11 deletions
diff --git a/kud/tests/_common.sh b/kud/tests/_common.sh
index 3120dad7..044891dd 100755
--- a/kud/tests/_common.sh
+++ b/kud/tests/_common.sh
@@ -27,10 +27,8 @@ unprotected_private_net=unprotected-private-net
protected_private_net=protected-private-net
ovn_multus_network_name=ovn-networkobj
rbd_metadata=rbd_metatada.json
-rbd_content_tarball=vault-consul-dev.tar
rbp_metadata=rbp_metatada.json
rbp_instance=rbp_instance.json
-rbp_content_tarball=profile.tar
# vFirewall vars
demo_artifacts_version=1.5.0
@@ -1119,16 +1117,38 @@ DEPLOYMENT
# populate_CSAR_rbdefinition() - Function that populates CSAR folder
# for testing resource bundle definition
function populate_CSAR_rbdefinition {
- local csar_id=$1
+ _checks_args "$1"
+ pushd "${CSAR_DIR}/$1"
+ print_msg "Create Helm Chart Archives"
+ rm -f *.tar.gz
+ tar -czf rb_profile.tar.gz -C $test_folder/vnfs/testrb/helm/profile .
+ #Creates vault-consul-dev-0.0.0.tgz
+ helm package $test_folder/vnfs/testrb/helm/vault-consul-dev --version 0.0.0
+ popd
+}
- _checks_args $csar_id
- pushd ${CSAR_DIR}/${csar_id}
+# populate_CSAR_edgex_rbdefinition() - Function that populates CSAR folder
+# for testing resource bundle definition of edgex scenario
+function populate_CSAR_edgex_rbdefinition {
+ _checks_args "$1"
+ pushd "${CSAR_DIR}/$1"
print_msg "Create Helm Chart Archives"
- rm -f ${rbd_content_tarball}.gz
- rm -f ${rbp_content_tarball}.gz
- tar -cf $rbd_content_tarball -C $test_folder/vnfs/testrb/helm vault-consul-dev
- tar -cf $rbp_content_tarball -C $test_folder/vnfs/testrb/helm/profile .
- gzip $rbp_content_tarball
- gzip $rbd_content_tarball
+ rm -f *.tar.gz
+ tar -czf rb_profile.tar.gz -C $test_folder/vnfs/edgex/profile .
+ tar -czf rb_definition.tar.gz -C $test_folder/vnfs/edgex/helm edgex
popd
}
+
+# populate_CSAR_fw_rbdefinition() - Function that populates CSAR folder
+# for testing resource bundle definition of firewall scenario
+function populate_CSAR_fw_rbdefinition {
+ _checks_args "$1"
+ pushd "${CSAR_DIR}/$1"
+ print_msg "Create Helm Chart Archives for vFirewall"
+ rm -f *.tar.gz
+ # Reuse profile from the edgeX case as it is an empty profile
+ tar -czf rb_profile.tar.gz -C $test_folder/vnfs/edgex/profile .
+ tar -czf rb_definition.tar.gz -C $test_folder/../demo firewall
+ popd
+}
+