Skip to content

Commit ab81b79

Browse files
committed
gatewayapicontroller: Delete the Istio CR
* test/extended/router/gatewayapicontroller.go: Delete the Istio CR and wait for the istiod pod to be deleted as part of the test cleanup.
1 parent 92a3e0b commit ab81b79

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/extended/router/gatewayapicontroller.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@ var _ = g.Describe("[sig-network-edge][OCPFeatureGate:GatewayAPIController][Feat
113113
e2e.Failf("Failed to delete GatewayClass %q", gatewayClassName)
114114
}
115115

116+
g.By("Deleting the Istio CR")
117+
118+
o.Expect(oc.AsAdmin().Run("delete").Args("--ignore-not-found=true", "istio", istioName).Execute()).Should(o.Succeed())
119+
120+
g.By("Waiting for the istiod pod to be deleted")
121+
122+
o.Eventually(func (g o.Gomega) {
123+
podsList, err := oc.KubeClient().CoreV1().Pods(ingressNamespace).List(context.Background(), metav1.ListOptions{LabelSelector: "app=istiod"})
124+
g.Expect(err).NotTo(o.HaveOccurred())
125+
g.Expect(podsList.Items).Should(o.BeEmpty())
126+
}).WithTimeout(10 * time.Minute).WithPolling(10 * time.Second).Should(o.Succeed())
127+
116128
g.By("Deleting the OSSM Operator resources")
117129

118130
operator, err := operatorsv1.NewForConfigOrDie(oc.AsAdmin().UserConfig()).Operators().Get(context.Background(), serviceMeshOperatorName, metav1.GetOptions{})

0 commit comments

Comments
 (0)