MCPcopy
hub / github.com/elastic/go-elasticsearch / TestClientMetrics

Function TestClientMetrics

elasticsearch_internal_test.go:410–424  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

408}
409
410func TestClientMetrics(t *testing.T) {
411 c, err := New(WithTransportOptions(elastictransport.WithMetrics()))
412 if err != nil {
413 t.Fatalf("Unexpected error: %s", err)
414 }
415
416 m, err := c.Metrics()
417 if err != nil {
418 t.Fatalf("Unexpected error: %v", err)
419 }
420
421 if m.Requests != 0 {
422 t.Errorf("Unexpected output: %s", m)
423 }
424}
425
426func TestResponseCheckOnly(t *testing.T) {
427 tests := []struct {

Callers

nothing calls this directly

Calls 3

WithTransportOptionsFunction · 0.85
NewFunction · 0.50
MetricsMethod · 0.45

Tested by

no test coverage detected