Skip to content

Commit ccc4883

Browse files
irisdingbjistio-testing
authored andcommitted
Fix delete istio-operator namespace error (istio#18497)
* Fix delete istio-operator namespace error * Check whether ns is deleted
1 parent 3b7b43f commit ccc4883

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/e2e/framework/kubernetes.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -625,12 +625,7 @@ func (k *KubeInfo) Teardown() error {
625625
log.Infof("Deleting namespace %v", k.Namespace)
626626
for attempts := 1; attempts <= maxAttempts; attempts++ {
627627
if *useOperator {
628-
if _, err := util.Shell("kubectl delete ns istio-operator --kubeconfig=%s",
629-
k.KubeConfig); err != nil {
630-
log.Errorf("Failed to delete istio-operator namespace.")
631-
return err
632-
}
633-
namespaceDeleted = true
628+
namespaceDeleted, _ = util.NamespaceDeleted("istio-operator", k.KubeConfig)
634629
} else {
635630
namespaceDeleted, _ = util.NamespaceDeleted(k.Namespace, k.KubeConfig)
636631
}

0 commit comments

Comments
 (0)