fix the bug #2799, add prefix (?i) in rewrite statement and add new e2e

test.
This commit is contained in:
dongqi1990 2018-07-18 22:08:37 +08:00
parent 50084b1167
commit 72a2aa171a
5 changed files with 139 additions and 120 deletions

View file

@ -105,7 +105,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Affinity", func() {
Annotations: map[string]string{
"nginx.ingress.kubernetes.io/affinity": "cookie",
"nginx.ingress.kubernetes.io/session-cookie-name": "SERVERID",
"nginx.ingress.kubernetes.io/rewrite-target": "/something",
},
},
Spec: v1beta1.IngressSpec{
@ -146,7 +145,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Affinity", func() {
Expect(len(errs)).Should(BeNumerically("==", 0))
Expect(resp.StatusCode).Should(Equal(http.StatusOK))
Expect(body).Should(ContainSubstring(fmt.Sprintf("request_uri=http://%v:8080/something/", host)))
Expect(body).Should(ContainSubstring(fmt.Sprintf("request_uri=http://%v:8080/", host)))
Expect(resp.Header.Get("Set-Cookie")).Should(ContainSubstring("SERVERID="))
})