From 5b9fca50ab64a0f51b29fe0a4269deea46be90a2 Mon Sep 17 00:00:00 2001 From: Konrad Bańka Date: Fri, 26 Feb 2021 05:45:23 +0100 Subject: Enable plugin_fw.sh to preserve CNF after tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue-ID: MULTICLOUD-1306 Signed-off-by: Konrad Bańka Change-Id: Iea0c2e2a36adadc81860f622f04e85a389f53e0c --- kud/tests/plugin_fw.sh | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/kud/tests/plugin_fw.sh b/kud/tests/plugin_fw.sh index de9c12e2..4d59006b 100755 --- a/kud/tests/plugin_fw.sh +++ b/kud/tests/plugin_fw.sh @@ -2,13 +2,16 @@ # SPDX-license-identifier: Apache-2.0 ############################################################################## # Copyright (c) 2018 -# Copyright © 2020 Samsung Electronics +# Copyright © 2021 Samsung Electronics # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +# Script respects environment variable SKIP_CNF_TEARDOWN +# If set to "yes", it will preserve CNF for manual handling + set -o errexit set -o nounset set -o pipefail @@ -129,16 +132,26 @@ print_msg "Assert ReleaseName has been correctly overriden" test "$(jq -r '.request."release-name"' <<< "${response}")" == "${release_name}" #Teardown -print_msg "Deleting VNF Instance" -delete_resource "${base_url}/instance/${vnf_id}" - -print_msg "Deleting Profile" -delete_resource "${base_url}/rb/definition/${rb_name}/${rb_version}/profile/${profile_name}" +if [ "${SKIP_CNF_TEARDOWN:-}" == "yes" ]; then + print_msg "Leaving CNF running for further debugging" + echo "Remember to later issue following DELETE calls to clean environment" + cat <