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

Function TestNew_InvalidURL

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

Source from the content-addressed store, hash-verified

148}
149
150func TestNew_InvalidURL(t *testing.T) {
151 t.Parallel()
152 _, err := New(WithAddresses(":foo"))
153 if err == nil {
154 t.Fatal("Expected error for invalid URL")
155 }
156}
157
158func TestNew_InvalidURLFromEnvironment(t *testing.T) {
159 t.Setenv("ELASTICSEARCH_URL", ":foobar")

Callers

nothing calls this directly

Calls 2

WithAddressesFunction · 0.85
NewFunction · 0.50

Tested by

no test coverage detected