From e261191f0b5179ce87d88162822e43d4460c003d Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 2 Mar 2021 14:26:12 +0100 Subject: [PATCH] e2e: pass namespace once in deletePodWithLabel() Currently framework.RunKubectl() adds `--namespace=...` 2x to the kubectl command. Once is sufficient. Signed-off-by: Niels de Vos --- e2e/pod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/pod.go b/e2e/pod.go index 17ded7d69..8ed71f56f 100644 --- a/e2e/pod.go +++ b/e2e/pod.go @@ -212,7 +212,7 @@ func deletePod(name, ns string, c kubernetes.Interface, t int) error { } func deletePodWithLabel(label, ns string, skipNotFound bool) error { - _, err := framework.RunKubectl(cephCSINamespace, "delete", "po", "-l", label, fmt.Sprintf("--ignore-not-found=%t", skipNotFound), fmt.Sprintf("--namespace=%s", ns)) + _, err := framework.RunKubectl(ns, "delete", "po", "-l", label, fmt.Sprintf("--ignore-not-found=%t", skipNotFound)) if err != nil { e2elog.Logf("failed to delete pod %v", err) }