From 0fdea4ee15f28016fc1e705bc0d3ba07adb4902f Mon Sep 17 00:00:00 2001 From: Mattia Lavacca Date: Tue, 26 Jul 2022 14:35:47 +0200 Subject: [PATCH] httproute tests working Signed-off-by: Mattia Lavacca --- .../dataplane/parser/translate_httproute.go | 2 ++ test/conformance/gateway_conformance_test.go | 24 +++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/internal/dataplane/parser/translate_httproute.go b/internal/dataplane/parser/translate_httproute.go index dc810edeab..785367834b 100644 --- a/internal/dataplane/parser/translate_httproute.go +++ b/internal/dataplane/parser/translate_httproute.go @@ -185,6 +185,8 @@ func generateKongRoutesFromHTTPRouteRule(httproute *gatewayv1alpha2.HTTPRoute, r r.Route.Headers = headers } + r.StripPath = kong.Bool(false) + // add the route to the list of routes for the service(s) routes = append(routes, r) } diff --git a/test/conformance/gateway_conformance_test.go b/test/conformance/gateway_conformance_test.go index 0242dd1a32..b29704f527 100644 --- a/test/conformance/gateway_conformance_test.go +++ b/test/conformance/gateway_conformance_test.go @@ -75,11 +75,21 @@ func TestGatewayConformance(t *testing.T) { // TODO: ensure that this module runs all Gateway conformance tests // https://github.com/Kong/kubernetes-ingress-controller/issues/2210 var enabledGatewayConformanceTests = sets.NewString( - //"HTTPRouteCrossNamespace", - // "HTTPRouteInvalidCrossNamespace" is the last one we need to get working - // before we can delete this set and simply run ALL, but requires: - // https://github.com/Kong/kubernetes-ingress-controller/issues/2080 - //"HTTPRouteMatchingAcrossRoutes", - //"HTTPRouteMatching", - "HTTPRouteSimpleSameNamespace", +// "HTTPRouteCrossNamespace", //OK +// "HTTPRouteDisallowedKind", //OK +// "HTTPExactPathMatching", //OK +// "HTTPRouteHeaderMatching", //OK +// "HTTPRouteHostnameIntersection", //FAIL +// "HTTPRouteInvalidNonExistentBackendRef", +// "HTTPRouteInvalidBackendRefUnknownKind" +// "HTTPRouteInvalidCrossNamespaceBackendRef", +// "HTTPRouteInvalidCrossNamespaceParentRef", +// "HTTPRouteInvalidReferenceGrant", +// "HTTPRouteListenerHostnameMatching", +// "HTTPRouteMatchingAcrossRoutes", //OK +// "HTTPRouteMatching", //OK +// "HTTPRouteQueryParamMatching", +// "HTTPRouteReferenceGrant", +// "HTTPRouteRequestHeaderModifier", +// "HTTPRouteSimpleSameNamespace", //OK )