kubernetes-sigs / ingress-controller-conformance

Repository for a compliance specification of ingress-controllers.
Apache License 2.0
43 stars 36 forks source link

Indent echoserver response #66

Closed aledbf closed 3 years ago

aledbf commented 3 years ago

This helps when debugging is enabled

  Scenario: An Ingress with mixed path rules should send traffic to the matching backend service where Exact is preferred # features/path_rules.feature:181
    When I send a "GET" request to "http://mixed-path-rules/foo"                                                          # feature.go:94 -> sigs.k8s.io/ingress-controller-conformance/test/conformance/pathrules.iSendARequestTo
    Then the response status-code must be 200                                                                             # feature.go:102 -> sigs.k8s.io/ingress-controller-conformance/test/conformance/pathrules.theResponseStatuscodeMustBe
    And the response must be served by the "foo-exact" service                                                            # feature.go:106 -> sigs.k8s.io/ingress-controller-conformance/test/conformance/pathrules.theResponseMustBeServedByTheService
    And the request path must be "/foo"                                                                                   # feature.go:110 -> sigs.k8s.io/ingress-controller-conformance/test/conformance/pathrules.theRequestPathMustBe

Sending request:
> GET /foo HTTP/1.1
> Host: mixed-path-rules
> User-Agent: Go-http-client/1.1
> Accept-Encoding: gzip
> 
> 

Received response:
< HTTP/1.1 200 OK
< Content-Length: 550
< Connection: keep-alive
< Content-Type: application/json
< Date: Tue, 18 Aug 2020 23:57:22 GMT
< Server: nginx/1.19.2
< Vary: Accept-Encoding
< X-Content-Type-Options: nosniff
< 
< {
<  "path": "/foo",
<  "host": "mixed-path-rules",
<  "method": "GET",
<  "proto": "HTTP/1.1",
<  "headers": {
<   "User-Agent": [
<    "Go-http-client/1.1"
<   ],
<   "X-Forwarded-For": [
<    "172.18.0.1"
<   ],
<   "X-Forwarded-Host": [
<    "mixed-path-rules"
<   ],
<   "X-Forwarded-Port": [
<    "80"
<   ],
<   "X-Forwarded-Proto": [
<    "http"
<   ],
<   "X-Real-Ip": [
<    "172.18.0.1"
<   ],
<   "X-Request-Id": [
<    "2065bcfa825661746093d916c25df759"
<   ],
<   "X-Scheme": [
<    "http"
<   ]
<  },
<  "namespace": "ingress-conformance-cwnxb",
<  "ingress": "path-rules",
<  "service": "foo-exact"
< }
aledbf commented 3 years ago

/assign @bowei

bowei commented 3 years ago

/lgtm /approve

k8s-ci-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, bowei

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/ingress-controller-conformance/blob/master/OWNERS)~~ [bowei] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment