Skip to content

Commit afa745c

Browse files
team-k8s-botpmalek
andauthored
tests: fix feature gates used in TestDeployAllInOneDBLESSGateway (#5832) (#5833)
(cherry picked from commit 5701912) Co-authored-by: Patryk Małek <[email protected]>
1 parent 9af1396 commit afa745c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/e2e/features_test.go

+10-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828

2929
"github.com/kong/kubernetes-ingress-controller/v3/internal/annotations"
3030
"github.com/kong/kubernetes-ingress-controller/v3/internal/gatewayapi"
31+
"github.com/kong/kubernetes-ingress-controller/v3/internal/manager/featuregates"
3132
"github.com/kong/kubernetes-ingress-controller/v3/internal/util"
3233
kongv1 "github.com/kong/kubernetes-ingress-controller/v3/pkg/apis/configuration/v1"
3334
"github.com/kong/kubernetes-ingress-controller/v3/pkg/clientset"
@@ -249,8 +250,13 @@ func TestDeployAllInOneDBLESSGateway(t *testing.T) {
249250
controllerDeployment := deployments.GetController(ctx, t, env)
250251
for i, container := range controllerDeployment.Spec.Template.Spec.Containers {
251252
if container.Name == controllerContainerName {
252-
controllerDeployment.Spec.Template.Spec.Containers[i].Env = append(controllerDeployment.Spec.Template.Spec.Containers[i].Env,
253-
corev1.EnvVar{Name: "CONTROLLER_FEATURE_GATES", Value: testenv.GetFeatureGates()})
253+
controllerDeployment.Spec.Template.Spec.Containers[i].Env = append(
254+
controllerDeployment.Spec.Template.Spec.Containers[i].Env,
255+
corev1.EnvVar{
256+
Name: "CONTROLLER_FEATURE_GATES",
257+
Value: fmt.Sprintf("%s=true", featuregates.GatewayAlphaFeature),
258+
},
259+
)
254260
}
255261
}
256262

@@ -263,6 +269,7 @@ func TestDeployAllInOneDBLESSGateway(t *testing.T) {
263269
require.NoError(t, err)
264270

265271
expectedMsg := "Required CustomResourceDefinitions are not installed, setting up a watch for them in case they are installed afterward"
272+
t.Logf("checking logs of #%d pods", len(pods.Items))
266273
for _, pod := range pods.Items {
267274
logs, err := getPodLogs(ctx, t, env, pod.Namespace, pod.Name)
268275
if err != nil {
@@ -274,7 +281,7 @@ func TestDeployAllInOneDBLESSGateway(t *testing.T) {
274281
}
275282
}
276283
return true
277-
}, time.Minute, 5*time.Second)
284+
}, time.Minute, 3*time.Second)
278285

279286
t.Logf("deploying Gateway APIs CRDs in standard channel from %s", consts.GatewayStandardCRDsKustomizeURL)
280287
require.NoError(t, clusters.KustomizeDeployForCluster(ctx, env.Cluster(), consts.GatewayStandardCRDsKustomizeURL))

0 commit comments

Comments
 (0)