MCPcopy Index your code
hub / github.com/zalando/skipper / TestLoopbackWithBackend

Function TestLoopbackWithBackend

proxy/loopback_test.go:193–215  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

191}
192
193func 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
217func TestLoopbackReachLimit(t *testing.T) {
218 routes := `

Callers

nothing calls this directly

Calls 1

testLoopbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…