MCPcopy
hub / github.com/fabiolb/fabio / TestProxyLogOutput

Function TestProxyLogOutput

proxy/http_integration_test.go:429–443  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

427}
428
429func TestProxyLogOutput(t *testing.T) {
430 t.Run("uncompressed response", func(t *testing.T) {
431 testProxyLogOutput(t, 73, config.Proxy{})
432 })
433 t.Run("compression enabled but no match", func(t *testing.T) {
434 testProxyLogOutput(t, 73, config.Proxy{
435 GZIPContentTypes: regexp.MustCompile(`^$`),
436 })
437 })
438 t.Run("compression enabled and active", func(t *testing.T) {
439 testProxyLogOutput(t, 28, config.Proxy{
440 GZIPContentTypes: regexp.MustCompile(`.*`),
441 })
442 })
443}
444
445func testProxyLogOutput(t *testing.T, bodySize int, cfg config.Proxy) {
446 t.Helper()

Callers

nothing calls this directly

Calls 1

testProxyLogOutputFunction · 0.85

Tested by

no test coverage detected