(t *testing.T)
| 262 | } |
| 263 | |
| 264 | func testServer(t *testing.T) (string, func() int64) { |
| 265 | t.Helper() |
| 266 | |
| 267 | var count atomic.Int64 |
| 268 | srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 269 | count.Add(1) |
| 270 | w.WriteHeader(http.StatusOK) |
| 271 | })) |
| 272 | t.Cleanup(srv.Close) |
| 273 | |
| 274 | return srv.URL, count.Load |
| 275 | } |
no test coverage detected