Skip to content

Commit bbea4a3

Browse files
chore(tests): port and re-enable HTTPRoute and Ingress validation webhook tests (#3141)
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
1 parent 1b0c75b commit bbea4a3

File tree

8 files changed

+464
-481
lines changed

8 files changed

+464
-481
lines changed

.github/workflows/tests.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,16 @@ jobs:
598598

599599
integration-tests-validating-webhook:
600600
runs-on: ubuntu-latest
601+
name: integration-tests-validating-webhook-${{ matrix.router_flavor }}
601602
needs:
602603
- check-docs-only
603604
- matrix_k8s_node_versions
604605
if: ${{ needs.check-docs-only.outputs.docs_only != 'true' }}
606+
strategy:
607+
matrix:
608+
router_flavor:
609+
- traditional_compatible
610+
- expressions
605611
steps:
606612
- name: Harden Runner
607613
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
@@ -623,8 +629,9 @@ jobs:
623629
run: make test.integration_validatingwebhook
624630
env:
625631
KONG_CONTROLLER_OUT: stdout
626-
GOTESTSUM_JUNITFILE: integration-tests.xml
632+
GOTESTSUM_JUNITFILE: integration-tests-${{ matrix.router_flavor }}.xml
627633
KONG_CLUSTER_VERSION: ${{ needs.matrix_k8s_node_versions.outputs.latest }}
634+
TEST_KONG_ROUTER_FLAVOR: ${{ matrix.router_flavor }}
628635
# This is needed for ktf to find latest releases of addons.
629636
# This could be changed so that ktf addons have their versions pinned
630637
# in the test Makefile instead.
@@ -634,22 +641,22 @@ jobs:
634641
if: always()
635642
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
636643
with:
637-
name: diagnostics-integration-validating-webhook
644+
name: diagnostics-integration-validating-webhook-${{ matrix.router_flavor }}
638645
path: /tmp/ktf-diag*
639646
if-no-files-found: ignore
640647

641648
- name: collect test coverage
642649
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
643650
with:
644-
name: coverage-integration-validating-webhook
651+
name: coverage-integration-validating-webhook-${{ matrix.router_flavor }}
645652
path: coverage.integration-validatingwebhook.out
646653

647654
- name: collect test report
648655
if: always()
649656
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
650657
with:
651-
name: tests-report-integration-validating-webhook
652-
path: integration-tests.xml
658+
name: tests-report-integration-validating-webhook-${{ matrix.router_flavor }}
659+
path: integration-tests-${{ matrix.router_flavor }}.xml
653660

654661
integration-tests-bluegreen:
655662
runs-on: ubuntu-latest

ingress-controller/test/integration/helpers_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ const (
2323
defaultGatewayName = helpers.DefaultGatewayName
2424
// unmanagedGatewayClassName is the name of the default GatewayClass created during the test environment setup.
2525
unmanagedGatewayClassName = "kong-unmanaged"
26-
// unsupportedControllerName is the name of the controller used for those gateways that are not supported
27-
// by an actual controller (i.e., they won't be scheduled).
28-
unsupportedControllerName gatewayapi.GatewayController = "example.com/unsupported-gateway-controller"
2926
// kongRouterFlavorExpressions is the value used in router_flavor of kong configuration
3027
// to enable expression based router of kong.
3128
kongRouterFlavorExpressions = "expressions"

ingress-controller/test/integration/httproute_webhook_test.go

Lines changed: 0 additions & 261 deletions
This file was deleted.

0 commit comments

Comments
 (0)