(t *testing.T)
| 427 | } |
| 428 | |
| 429 | func 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 | |
| 445 | func testProxyLogOutput(t *testing.T, bodySize int, cfg config.Proxy) { |
| 446 | t.Helper() |
nothing calls this directly
no test coverage detected