[VOL-4359] Added ETCD data cleanup verification after device delete
Change-Id: Ic3e3eced67826c6c7277cc8c21f0e6241b7e9a0b
diff --git a/libraries/k8s.robot b/libraries/k8s.robot
index 815cec4..fc5e0e7 100755
--- a/libraries/k8s.robot
+++ b/libraries/k8s.robot
@@ -78,7 +78,8 @@
[Arguments] ${namespace} ${name} ${command} ${grep}=${EMPTY}
[Documentation] Uses kubectl to execute a command in the pod and return the output
${rc} ${exec_pod_name}= Run Keyword If '${grep}'=='${EMPTY}'
- ... Run and Return Rc and Output kubectl -n ${namespace} get pods -l app.kubernetes.io/name=${name} -o name
+ ... Run and Return Rc and Output
+ ... kubectl -n ${namespace} get pods -l app.kubernetes.io/name=${name} -o name | awk 'NR==1{print $1}'
... ELSE Run and Return Rc and Output
... kubectl -n ${namespace} get pods -l app.kubernetes.io/name=${name} -o name \| grep ${grep}
Log ${exec_pod_name}