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

Function TestNew_InvalidURLFromEnvironment

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

Source from the content-addressed store, hash-verified

156}
157
158func TestNew_InvalidURLFromEnvironment(t *testing.T) {
159 t.Setenv("ELASTICSEARCH_URL", ":foobar")
160 _, err := New()
161 if err == nil {
162 t.Fatal("Expected error for invalid URL from environment")
163 }
164}
165
166func TestNew_WithBasicAuth(t *testing.T) {
167 t.Parallel()

Callers

nothing calls this directly

Calls 1

NewFunction · 0.50

Tested by

no test coverage detected