Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix feature gates used in TestDeployAllInOneDBLESSGateway #5832

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions test/e2e/features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (

"github.com/kong/kubernetes-ingress-controller/v3/internal/annotations"
"github.com/kong/kubernetes-ingress-controller/v3/internal/gatewayapi"
"github.com/kong/kubernetes-ingress-controller/v3/internal/manager/featuregates"
"github.com/kong/kubernetes-ingress-controller/v3/internal/util"
kongv1 "github.com/kong/kubernetes-ingress-controller/v3/pkg/apis/configuration/v1"
"github.com/kong/kubernetes-ingress-controller/v3/pkg/clientset"
Expand Down Expand Up @@ -249,8 +250,13 @@ func TestDeployAllInOneDBLESSGateway(t *testing.T) {
controllerDeployment := deployments.GetController(ctx, t, env)
for i, container := range controllerDeployment.Spec.Template.Spec.Containers {
if container.Name == controllerContainerName {
controllerDeployment.Spec.Template.Spec.Containers[i].Env = append(controllerDeployment.Spec.Template.Spec.Containers[i].Env,
corev1.EnvVar{Name: "CONTROLLER_FEATURE_GATES", Value: testenv.GetFeatureGates()})
controllerDeployment.Spec.Template.Spec.Containers[i].Env = append(
controllerDeployment.Spec.Template.Spec.Containers[i].Env,
corev1.EnvVar{
Name: "CONTROLLER_FEATURE_GATES",
Value: fmt.Sprintf("%s=true", featuregates.GatewayAlphaFeature),
},
)
}
}

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

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

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