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

Function TestLoopbackFilterShunt

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

Source from the content-addressed store, hash-verified

325}
326
327func TestLoopbackFilterShunt(t *testing.T) {
328 routes := `
329 entry: *
330 -> appendResponseHeader("X-Entry-Route-Done", "true")
331 -> setRequestHeader("X-Loop-Route", "1")
332 -> <loopback>;
333
334 loopRoute1: Header("X-Loop-Route", "1")
335 -> appendResponseHeader("X-Loop-Route-Done", "1")
336 -> redirectTo(302, "/redirect/path")
337 -> setRequestHeader("X-Loop-Route", "2")
338 -> <loopback>;
339
340 loopRoute2: Header("X-Loop-Route", "2")
341 -> appendResponseHeader("X-Loop-Route-Done", "2")
342 -> "$backend";
343 `
344
345 testLoopback(t, routes, Params{}, nil, http.StatusFound, http.Header{
346 "X-Entry-Route-Done": []string{"true"},
347 "X-Loop-Route-Done": []string{"1"},
348 "X-Loop-Backend-Done": nil,
349 })
350}
351
352func TestLoopbackPathParams(t *testing.T) {
353 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…