(w http.ResponseWriter, r *http.Request)
| 17 | } |
| 18 | |
| 19 | func (h *capsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
| 20 | if r.URL.Path != "/api/v1/server/capabilities" { |
| 21 | w.WriteHeader(http.StatusNotFound) |
| 22 | return |
| 23 | } |
| 24 | h.hits.Add(1) |
| 25 | w.WriteHeader(int(h.status.Load())) |
| 26 | if b, _ := h.body.Load().(string); b != "" { |
| 27 | _, _ = w.Write([]byte(b)) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func TestCollectionNotFoundIsAuthoritative_Definitive_CachesVerdict(t *testing.T) { |
| 32 | for _, tc := range []struct { |
nothing calls this directly
no test coverage detected