(t *testing.T)
| 72 | } |
| 73 | |
| 74 | func TestBadURLsIndexClient(t *testing.T) { |
| 75 | bc := &IndexClient{ |
| 76 | CountURL: "bogus url", |
| 77 | QueryURL: "fake url", |
| 78 | httpClient: http.DefaultClient, |
| 79 | } |
| 80 | c, err := bc.DocCount() |
| 81 | if err == nil || c != 0 { |
| 82 | t.Errorf("expected count error on bad CountURL") |
| 83 | } |
| 84 | sr, err := bc.Search(nil) |
| 85 | if err == nil || sr != nil { |
| 86 | t.Errorf("expected search error on bad QueryURL") |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | func TestGroupIndexClientsByHostPort(t *testing.T) { |
| 91 | c0 := &IndexClient{ |