added new tests for regex paths

This commit is contained in:
swapnil dubey 2023-01-22 00:22:16 +05:30
parent b94513fb0f
commit 56de5ea470

View file

@ -67,5 +67,29 @@ var _ = framework.IngressNginxDescribe("[Ingress] [PathType] prefix checks", fun
WithHeader("Host", host). WithHeader("Host", host).
Expect(). Expect().
Status(http.StatusOK) Status(http.StatusOK)
f.HTTPTestClient().
GET("/aaa/.*").
WithHeader("Host", host).
Expect().
Status(http.StatusOK)
f.HTTPTestClient().
GET("/aaa/(.+)").
WithHeader("Host", host).
Expect().
Status(http.StatusOK)
f.HTTPTestClient().
GET("/aaa/?(.*)").
WithHeader("Host", host).
Expect().
Status(http.StatusNotFound)
f.HTTPTestClient().
GET("/aaa/?(.+)").
WithHeader("Host", host).
Expect().
Status(http.StatusNotFound)
}) })
}) })