Modified k8s.robot as kubectl command was unable to parse pod name
Change-Id: I702d32dc4248b7aa0230460706f82568ef56a5fb
diff --git a/libraries/k8s.robot b/libraries/k8s.robot
index 71c8c7e..7362470 100644
--- a/libraries/k8s.robot
+++ b/libraries/k8s.robot
@@ -45,8 +45,10 @@
Restart Pod
[Arguments] ${namespace} ${name}
[Documentation] Uses kubectl to force delete pod
- ${rc} ${restart_pod_name}= Run and Return Rc and Output kubectl get pods --template $'{{range .items}}{{.metadata.name}}{{"\\n"}}{{end}}', -n ${namespace} | grep ${name}
+ ${rc} ${restart_pod_name}= Run and Return Rc and Output
+ ... kubectl get pods -n ${namespace} | grep ${name} | awk 'NR==1{print $1}'
Log ${restart_pod_name}
+ Should Not Be Empty ${restart_pod_name} Unable to parse pod name
${rc} ${output}= Run and Return Rc and Output kubectl delete pod ${restart_pod_name} -n ${namespace} --grace-period=0 --force
Log ${output}