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 <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2021-03-02 14:26:12 +01:00 committed by mergify[bot]
parent f9c777d9e6
commit e261191f0b

View File

@ -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)
}