(t *testing.T)
| 17 | } |
| 18 | |
| 19 | func TestServiceLoader(t *testing.T) { |
| 20 | req, err := http.NewRequest("GET", "/api/v1/stats", nil) |
| 21 | if err != nil { |
| 22 | t.Error(err) |
| 23 | } |
| 24 | rr := httptest.NewRecorder() |
| 25 | testHandlers := serviceLoader(cacheIndexHandler(), emptyTestHandler()) |
| 26 | testHandlers.ServeHTTP(rr, req) |
| 27 | if status := rr.Code; status != http.StatusAccepted { |
| 28 | t.Errorf("handlers not loading properly. want: 202, got: %d", rr.Code) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func TestRequestMetrics(t *testing.T) { |
| 33 | var b bytes.Buffer |
nothing calls this directly
no test coverage detected
searching dependent graphs…