(t *testing.T)
| 105 | } |
| 106 | |
| 107 | func TestLargeRequest(t *testing.T) { |
| 108 | tester := caddytest.NewTester(t) |
| 109 | initServer(t, tester, ` |
| 110 | { |
| 111 | skip_install_trust |
| 112 | admin localhost:2999 |
| 113 | http_port `+testPort+` |
| 114 | https_port 9443 |
| 115 | } |
| 116 | |
| 117 | localhost:`+testPort+` { |
| 118 | route { |
| 119 | php { |
| 120 | root ../testdata |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | `, "caddyfile") |
| 125 | |
| 126 | tester.AssertPostResponseBody( |
| 127 | "http://localhost:"+testPort+"/large-request.php", |
| 128 | []string{}, |
| 129 | bytes.NewBufferString(strings.Repeat("f", 1_048_576)), |
| 130 | http.StatusOK, |
| 131 | "Request body size: 1048576 (unknown)", |
| 132 | ) |
| 133 | } |
| 134 | |
| 135 | func TestWorker(t *testing.T) { |
| 136 | var wg sync.WaitGroup |
nothing calls this directly
no test coverage detected