(t *testing.T)
| 3327 | } |
| 3328 | |
| 3329 | func TestSilentHandlerLoggingInTrace(t *testing.T) { |
| 3330 | // must have debug to assert that the endpoints below don't show in debug logs |
| 3331 | base.SetUpTestLogging(t, base.LevelDebug, base.KeyHTTP, base.KeyHTTPResp) |
| 3332 | |
| 3333 | rt := NewRestTester(t, nil) |
| 3334 | defer rt.Close() |
| 3335 | |
| 3336 | base.AssertLogNotContains(t, "_ping", func() { |
| 3337 | resp := rt.SendRequest(http.MethodGet, "/_ping", "") |
| 3338 | RequireStatus(t, resp, http.StatusOK) |
| 3339 | }) |
| 3340 | |
| 3341 | base.AssertLogNotContains(t, "/metrics", func() { |
| 3342 | headers := map[string]string{ |
| 3343 | "Authorization": GetBasicAuthHeader(t, base.TestClusterUsername(), base.TestClusterPassword()), |
| 3344 | } |
| 3345 | resp := rt.SendMetricsRequestWithHeaders(http.MethodGet, "/metrics", "", headers) |
| 3346 | RequireStatus(t, resp, http.StatusOK) |
| 3347 | }) |
| 3348 | |
| 3349 | base.AssertLogNotContains(t, "/_metrics", func() { |
| 3350 | headers := map[string]string{ |
| 3351 | "Authorization": GetBasicAuthHeader(t, base.TestClusterUsername(), base.TestClusterPassword()), |
| 3352 | } |
| 3353 | resp := rt.SendMetricsRequestWithHeaders(http.MethodGet, "/_metrics", "", headers) |
| 3354 | RequireStatus(t, resp, http.StatusOK) |
| 3355 | }) |
| 3356 | |
| 3357 | base.AssertLogNotContains(t, "/_expvar", func() { |
| 3358 | headers := map[string]string{ |
| 3359 | "Authorization": GetBasicAuthHeader(t, base.TestClusterUsername(), base.TestClusterPassword()), |
| 3360 | } |
| 3361 | resp := rt.SendMetricsRequestWithHeaders(http.MethodGet, "/_expvar", "", headers) |
| 3362 | RequireStatus(t, resp, http.StatusOK) |
| 3363 | }) |
| 3364 | |
| 3365 | base.AssertLogNotContains(t, "/_expvar", func() { |
| 3366 | resp := rt.SendAdminRequest(http.MethodGet, "/_expvar", "") |
| 3367 | RequireStatus(t, resp, http.StatusOK) |
| 3368 | }) |
| 3369 | } |
| 3370 | |
| 3371 | // TestHLVUpdateOnRevReplicatorPut: |
| 3372 | // - Test that the HLV is updated correctly when a document is put via the rev replicator running in rev mode |
nothing calls this directly
no test coverage detected