feat: support full path regex annotation (#286)

Signed-off-by: charlie <qianglin98@qq.com>
This commit is contained in:
Qianglin Li
2023-06-02 18:56:22 +08:00
committed by GitHub
parent b23fae7a12
commit 80d6ecfddb
11 changed files with 215 additions and 23 deletions

View File

@@ -30,9 +30,8 @@ var HTTPRouteRewritePath = suite.ConformanceTest{
Description: "A single Ingress in the higress-conformance-infra namespace uses the rewrite path.",
Manifests: []string{"tests/httproute-rewrite-path.yaml"},
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
t.Run("Rewrite HTTPRoute Path", func(t *testing.T) {
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, http.Assertion{
testCases := []http.Assertion{
{
Request: http.AssertionRequest{
ActualRequest: http.Request{Path: "/svc/foo"},
ExpectedRequest: &http.ExpectedRequest{
@@ -50,7 +49,14 @@ var HTTPRouteRewritePath = suite.ConformanceTest{
TargetBackend: "infra-backend-v1",
TargetNamespace: "higress-conformance-infra",
},
})
},
}
t.Run("Rewrite HTTPRoute Path", func(t *testing.T) {
for _, testCase := range testCases {
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testCase)
}
})
},
}