From d6f900721c81a2c03cb1a21a3d2064e9a69fc4b7 Mon Sep 17 00:00:00 2001 From: Rajamohan Raj Date: Thu, 30 Jul 2020 23:49:54 +0000 Subject: Sanity test script for new releases. Developed a script which can be used to test a new release and confirm that the minimum components like clm, instantiation by orchestrator and rsync are working fine after the code change. Issue-ID: MULTICLOUD-1174 Signed-off-by: Rajamohan Raj Change-Id: I7d519fa88b71fb34d13b7d61f3f8b36edc9fa5f3 --- kud/tests/sanity-check-for-v2.sh | 508 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 508 insertions(+) create mode 100755 kud/tests/sanity-check-for-v2.sh (limited to 'kud/tests/sanity-check-for-v2.sh') diff --git a/kud/tests/sanity-check-for-v2.sh b/kud/tests/sanity-check-for-v2.sh new file mode 100755 index 00000000..b8d07793 --- /dev/null +++ b/kud/tests/sanity-check-for-v2.sh @@ -0,0 +1,508 @@ +#!/bin/bash + +# Copyright 2020 Intel Corporation, Inc +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +set -o errexit +set -o nounset +set -o pipefail + + +source _common_test.sh +source _functions.sh +#source _common.sh + + +base_url_orchestrator=${base_url_orchestrator:-"http://localhost:9015/v2"} +base_url_clm=${base_url_clm:-"http://localhost:9019/v2"} + + +CSAR_DIR="/opt/csar" +csar_id="cb009bfe-bbee-11e8-9766-525400435678" + + +app1_helm_path="$CSAR_DIR/$csar_id/prometheus-operator.tar.gz" +app1_profile_path="$CSAR_DIR/$csar_id/prometheus-operator_profile.tar.gz" +app2_helm_path="$CSAR_DIR/$csar_id/collectd.tar.gz" +app2_profile_path="$CSAR_DIR/$csar_id/collectd_profile.tar.gz" + +kubeConfigLocal="/home/otc/.kube/config" + + + +function populate_CSAR_composite_app_helm { + _checks_args "$1" + pushd "${CSAR_DIR}/$1" + print_msg "Create Helm Chart Archives for compositeApp" + rm -f *.tar.gz + tar -czf collectd.tar.gz -C $test_folder/vnfs/comp-app/collection/app1/helm . + tar -czf prometheus-operator.tar.gz -C $test_folder/vnfs/comp-app/collection/app2/helm . + tar -czf collectd_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/app1/profile . + tar -czf prometheus-operator_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/app2/profile . + popd +} + + +# ---------BEGIN: SET CLM DATA--------------- + +clusterprovidername="sanity-test-cluster-provider" +clusterproviderdata="$(cat<