From 25bdc3b0bdcac29e80c576801fcd05812b756deb Mon Sep 17 00:00:00 2001 From: oliviassss Date: Wed, 29 May 2024 14:03:02 -0700 Subject: [PATCH 1/2] update the traffic test for ingress --- test/e2e/ingress/vanilla_ingress_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/e2e/ingress/vanilla_ingress_test.go b/test/e2e/ingress/vanilla_ingress_test.go index d83bde27f..c3f00b04a 100644 --- a/test/e2e/ingress/vanilla_ingress_test.go +++ b/test/e2e/ingress/vanilla_ingress_test.go @@ -738,7 +738,6 @@ var _ = Describe("vanilla ingress tests", func() { }, } annotation := map[string]string{ - "kubernetes.io/ingress.class": "alb", "alb.ingress.kubernetes.io/scheme": "internet-facing", "alb.ingress.kubernetes.io/target-type": "ip", "alb.ingress.kubernetes.io/ip-address-type": "ipv4", @@ -766,10 +765,13 @@ var _ = Describe("vanilla ingress tests", func() { // test traffic ExpectLBDNSBeAvailable(ctx, tf, lbARN, lbDNS) - httpExp := httpexpect.New(tf.LoggerReporter, fmt.Sprintf("http://%v", lbDNS)) - httpExp.GET("/path").Expect(). - Status(http.StatusOK). - Body().Equal("Hello World!") + + //TODO: update the traffic test for dualstack-without-public-ipv4 ALB + // as it may need additional setup compared to dualstack ALB + //httpExp := httpexpect.New(tf.LoggerReporter, fmt.Sprintf("http://%v", lbDNS)) + //httpExp.GET("/path").Expect(). + //Status(http.StatusOK). + //Body().Equal("Hello World!") }) }) }) From f0727f3bdda7238aaa07d740c181a002f70bea55 Mon Sep 17 00:00:00 2001 From: oliviassss Date: Wed, 29 May 2024 16:23:33 -0700 Subject: [PATCH 2/2] make crds --- config/webhook/manifests.yaml | 1 + test/e2e/ingress/vanilla_ingress_test.go | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 1493d5386..0b1a24bfe 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -1,3 +1,4 @@ +--- apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: diff --git a/test/e2e/ingress/vanilla_ingress_test.go b/test/e2e/ingress/vanilla_ingress_test.go index c3f00b04a..063ba4be0 100644 --- a/test/e2e/ingress/vanilla_ingress_test.go +++ b/test/e2e/ingress/vanilla_ingress_test.go @@ -738,6 +738,7 @@ var _ = Describe("vanilla ingress tests", func() { }, } annotation := map[string]string{ + "kubernetes.io/ingress.class": "alb", "alb.ingress.kubernetes.io/scheme": "internet-facing", "alb.ingress.kubernetes.io/target-type": "ip", "alb.ingress.kubernetes.io/ip-address-type": "ipv4", @@ -768,10 +769,12 @@ var _ = Describe("vanilla ingress tests", func() { //TODO: update the traffic test for dualstack-without-public-ipv4 ALB // as it may need additional setup compared to dualstack ALB - //httpExp := httpexpect.New(tf.LoggerReporter, fmt.Sprintf("http://%v", lbDNS)) - //httpExp.GET("/path").Expect(). - //Status(http.StatusOK). - //Body().Equal("Hello World!") + if annotation["alb.ingress.kubernetes.io/ip-address-type"] != "dualstack-without-public-ipv4" { + httpExp := httpexpect.New(tf.LoggerReporter, fmt.Sprintf("http://%v", lbDNS)) + httpExp.GET("/path").Expect(). + Status(http.StatusOK). + Body().Equal("Hello World!") + } }) }) })