(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestNew_WithAddressesOverridesEnvironment(t *testing.T) { |
| 90 | t.Setenv("ELASTICSEARCH_URL", "http://example.com") |
| 91 | c, err := New(WithAddresses("http://localhost:8080")) |
| 92 | if err != nil { |
| 93 | t.Fatalf("Unexpected error: %s", err) |
| 94 | } |
| 95 | u := c.Transport.(*elastictransport.Client).URLs()[0].String() |
| 96 | if u != "http://localhost:8080" { |
| 97 | t.Errorf("Unexpected URL, want=http://localhost:8080, got=%s", u) |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | func TestNew_WithCloudID(t *testing.T) { |
| 102 | t.Parallel() |
nothing calls this directly
no test coverage detected