From 9797750fd2652d52637b51db6154dee2d3848241 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Sat, 1 Jul 2017 16:01:45 -0500 Subject: [PATCH] Add support for helm tests in multiple namespaces Originally, the function to execute helm tests expected the helm release to be in the openstack namespace. This changes the function to get the namespace directly from the helm releases to allow for the gathering of logs and removal of resources from the namespace a release was installed to Change-Id: Ic9d1215f363a6251bcc33bead311aba1ba67a658 --- tools/gate/funcs/helm.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/gate/funcs/helm.sh b/tools/gate/funcs/helm.sh index 937df8168e..8e19e7d65b 100755 --- a/tools/gate/funcs/helm.sh +++ b/tools/gate/funcs/helm.sh @@ -85,10 +85,13 @@ function helm_test_deployment { TIMEOUT=$2 fi + # Get the namespace of the chart via the Helm release + NAMESPACE=$(helm status ${DEPLOYMENT} | awk '/^NAMESPACE/ { print $NF }') + helm test --timeout ${TIMEOUT} ${DEPLOYMENT} mkdir -p ${LOGS_DIR}/rally - kubectl logs -n openstack ${DEPLOYMENT}-rally-test > ${LOGS_DIR}/rally/${DEPLOYMENT} - kubectl delete -n openstack pod ${DEPLOYMENT}-rally-test + kubectl logs -n ${NAMESPACE} ${DEPLOYMENT}-rally-test > ${LOGS_DIR}/rally/${DEPLOYMENT} + kubectl delete -n ${NAMESPACE} pod ${DEPLOYMENT}-rally-test } function helm_plugin_template_install {