(t *testing.T)
| 238 | } |
| 239 | |
| 240 | func TestNew_WithTransportOptions(t *testing.T) { |
| 241 | t.Parallel() |
| 242 | |
| 243 | c, err := New( |
| 244 | WithTransportOptions( |
| 245 | elastictransport.WithTransport(&mockTransp{}), |
| 246 | elastictransport.WithMaxRetries(5), |
| 247 | ), |
| 248 | ) |
| 249 | if err != nil { |
| 250 | t.Fatalf("Unexpected error: %s", err) |
| 251 | } |
| 252 | |
| 253 | _, err = c.Perform(&http.Request{URL: &url.URL{}, Header: make(http.Header)}) |
| 254 | if err != nil { |
| 255 | t.Fatalf("Unexpected error: %s", err) |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | func TestNew_WithCompatibilityMode(t *testing.T) { |
| 260 | t.Parallel() |
nothing calls this directly
no test coverage detected