Run test env towards selected kube cluster
Added option to run test env towards local/remote kubernetes cluster
Issue-ID: NONRTRIC-728
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I70c22990cfc1f44526933550d46970f600bf21aa
diff --git a/test/common/cr_api_functions.sh b/test/common/cr_api_functions.sh
index a12b69e..45ed1fb 100644
--- a/test/common/cr_api_functions.sh
+++ b/test/common/cr_api_functions.sh
@@ -94,8 +94,8 @@
# args: <log-dir> <file-prexix>
__CR_store_docker_logs() {
if [ $RUNMODE == "KUBE" ]; then
- for podname in $(kubectl get pods -n $KUBE_SIM_NAMESPACE -l "autotest=CR" -o custom-columns=":metadata.name"); do
- kubectl logs -n $KUBE_SIM_NAMESPACE $podname --tail=-1 > $1$2_$podname.log 2>&1
+ for podname in $(kubectl $KUBECONF get pods -n $KUBE_SIM_NAMESPACE -l "autotest=CR" -o custom-columns=":metadata.name"); do
+ kubectl $KUBECONF logs -n $KUBE_SIM_NAMESPACE $podname --tail=-1 > $1$2_$podname.log 2>&1
done
else
crs=$(docker ps --filter "name=$CR_APP_NAME" --filter "network=$DOCKER_SIM_NWNAME" --filter "status=running" --format {{.Names}})