Refactor assertions
This commit is contained in:
parent
af2dce901d
commit
a51136b863
18 changed files with 46 additions and 46 deletions
|
|
@ -63,7 +63,7 @@ var _ = framework.IngressNginxDescribe("X-Forwarded headers", func() {
|
|||
Set("X-Forwarded-Host", "myhost").
|
||||
End()
|
||||
|
||||
Expect(len(errs)).Should(BeNumerically("==", 0))
|
||||
Expect(errs).Should(BeEmpty())
|
||||
Expect(resp.StatusCode).Should(Equal(http.StatusOK))
|
||||
Expect(body).Should(ContainSubstring(fmt.Sprintf("host=myhost")))
|
||||
Expect(body).Should(ContainSubstring(fmt.Sprintf("x-forwarded-host=myhost")))
|
||||
|
|
@ -92,7 +92,7 @@ var _ = framework.IngressNginxDescribe("X-Forwarded headers", func() {
|
|||
Set("X-Forwarded-Host", "myhost").
|
||||
End()
|
||||
|
||||
Expect(len(errs)).Should(BeNumerically("==", 0))
|
||||
Expect(errs).Should(BeEmpty())
|
||||
Expect(resp.StatusCode).Should(Equal(http.StatusOK))
|
||||
Expect(body).Should(ContainSubstring(fmt.Sprintf("host=forwarded-headers")))
|
||||
Expect(body).Should(ContainSubstring(fmt.Sprintf("x-forwarded-port=80")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue