Skip to content

Commit c5eafb0

Browse files
clean up, add cni comment
1 parent a0d83e5 commit c5eafb0

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

acceptance/tests/api-gateway/api_gateway_test.go

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func TestAPIGateway_Basic(t *testing.T) {
8686

8787
if cfg.EnableCNI {
8888
helmValues["connectInject.cni.namespace"] = "cni-namespace"
89-
//create namespace for CNI
89+
//create namespace for CNI. CNI pods require NET_ADMIN so the need to run in a non PSA restricted namespace.
9090
k8s.RunKubectl(t, ctx.KubectlOptions(t), "create", "namespace", "cni-namespace")
9191
}
9292
}
@@ -231,12 +231,9 @@ func TestAPIGateway_Basic(t *testing.T) {
231231
require.EqualValues(t, gatewayClassControllerName, httproute.Status.Parents[0].ControllerName)
232232
require.EqualValues(t, "gateway", httproute.Status.Parents[0].ParentRef.Name)
233233
counter = &retry.Counter{Count: 120, Wait: 2 * time.Second}
234-
retry.RunWith(counter, t, func(r *retry.R) {
235-
checkStatusCondition(t, httproute.Status.Parents[0].Conditions, trueCondition("Accepted", "Accepted"))
236-
checkStatusCondition(t, httproute.Status.Parents[0].Conditions, trueCondition("ResolvedRefs", "ResolvedRefs"))
237-
//This check is particularly flaky and leads to a lot of false failures.
238-
//checkStatusCondition(t, httproute.Status.Parents[0].Conditions, trueCondition("ConsulAccepted", "Accepted"))
239-
})
234+
checkStatusCondition(t, httproute.Status.Parents[0].Conditions, trueCondition("Accepted", "Accepted"))
235+
checkStatusCondition(t, httproute.Status.Parents[0].Conditions, trueCondition("ResolvedRefs", "ResolvedRefs"))
236+
checkStatusCondition(t, httproute.Status.Parents[0].Conditions, trueCondition("ConsulAccepted", "Accepted"))
240237

241238
// tcp route checks
242239
var tcpRoute gwv1alpha2.TCPRoute
@@ -253,12 +250,9 @@ func TestAPIGateway_Basic(t *testing.T) {
253250
require.EqualValues(t, "gateway", tcpRoute.Status.Parents[0].ParentRef.Name)
254251
counter = &retry.Counter{Count: 120, Wait: 2 * time.Second}
255252

256-
retry.RunWith(counter, t, func(r *retry.R) {
257-
checkStatusCondition(t, tcpRoute.Status.Parents[0].Conditions, trueCondition("Accepted", "Accepted"))
258-
checkStatusCondition(t, tcpRoute.Status.Parents[0].Conditions, trueCondition("ResolvedRefs", "ResolvedRefs"))
259-
//This check is particularly flaky and leads to a lot of false failures.
260-
//checkStatusCondition(t, tcpRoute.Status.Parents[0].Conditions, trueCondition("ConsulAccepted", "Accepted"))
261-
})
253+
checkStatusCondition(t, tcpRoute.Status.Parents[0].Conditions, trueCondition("Accepted", "Accepted"))
254+
checkStatusCondition(t, tcpRoute.Status.Parents[0].Conditions, trueCondition("ResolvedRefs", "ResolvedRefs"))
255+
checkStatusCondition(t, tcpRoute.Status.Parents[0].Conditions, trueCondition("ConsulAccepted", "Accepted"))
262256

263257
// check that the Consul entries were created
264258
var gateway *api.APIGatewayConfigEntry

0 commit comments

Comments
 (0)