(t *testing.T)
| 233 | } |
| 234 | |
| 235 | func TestClientInterface(t *testing.T) { |
| 236 | t.Run("Transport", func(t *testing.T) { |
| 237 | c, err := New(WithTransportOptions(elastictransport.WithTransport(&mockTransp{}))) |
| 238 | |
| 239 | if err != nil { |
| 240 | t.Fatalf("Unexpected error: %s", err) |
| 241 | } |
| 242 | |
| 243 | if called != false { // megacheck ignore |
| 244 | t.Errorf("Unexpected call to transport by client") |
| 245 | } |
| 246 | |
| 247 | _, err = c.Perform(&http.Request{URL: &url.URL{}, Header: make(http.Header)}) |
| 248 | if err != nil { |
| 249 | t.Fatalf("Unexpected error: %s", err) |
| 250 | } |
| 251 | |
| 252 | if called != true { // megacheck ignore |
| 253 | t.Errorf("Expected client to call transport") |
| 254 | } |
| 255 | }) |
| 256 | } |
| 257 | |
| 258 | func TestAddrsToURLs(t *testing.T) { |
| 259 | tt := []struct { |
nothing calls this directly
no test coverage detected