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

Function TestNewBase_WithAddresses

options_test.go:482–492  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

480}
481
482func TestNewBase_WithAddresses(t *testing.T) {
483 t.Parallel()
484 c, err := NewBase(WithAddresses("http://localhost:8080"))
485 if err != nil {
486 t.Fatalf("Unexpected error: %s", err)
487 }
488 u := c.Transport.(*elastictransport.Client).URLs()[0].String()
489 if u != "http://localhost:8080" {
490 t.Errorf("Unexpected URL, want=http://localhost:8080, got=%s", u)
491 }
492}
493
494func TestNewBase_Close(t *testing.T) {
495 t.Parallel()

Callers

nothing calls this directly

Calls 3

WithAddressesFunction · 0.85
NewBaseFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected