(t *testing.T)
| 191 | } |
| 192 | |
| 193 | func TestLoopbackWithBackend(t *testing.T) { |
| 194 | routes := ` |
| 195 | entry: * |
| 196 | -> appendResponseHeader("X-Entry-Route-Done", "true") |
| 197 | -> setRequestHeader("X-Loop-Route", "1") |
| 198 | -> <loopback>; |
| 199 | |
| 200 | loopRoute1: Header("X-Loop-Route", "1") |
| 201 | -> appendResponseHeader("X-Loop-Route-Done", "1") |
| 202 | -> setRequestHeader("X-Loop-Route", "2") |
| 203 | -> <loopback>; |
| 204 | |
| 205 | loopRoute2: Header("X-Loop-Route", "2") |
| 206 | -> appendResponseHeader("X-Loop-Route-Done", "2") |
| 207 | -> "$backend"; |
| 208 | ` |
| 209 | |
| 210 | testLoopback(t, routes, Params{}, nil, http.StatusOK, http.Header{ |
| 211 | "X-Entry-Route-Done": []string{"true"}, |
| 212 | "X-Loop-Route-Done": []string{"1", "2"}, |
| 213 | "X-Backend-Done": []string{"true"}, |
| 214 | }) |
| 215 | } |
| 216 | |
| 217 | func TestLoopbackReachLimit(t *testing.T) { |
| 218 | routes := ` |
nothing calls this directly
no test coverage detected
searching dependent graphs…