(t *testing.T)
| 156 | } |
| 157 | |
| 158 | func 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 | |
| 166 | func TestNew_WithBasicAuth(t *testing.T) { |
| 167 | t.Parallel() |