MCPcopy Create free account
hub / github.com/couchbase/cbft / TestBadURLsIndexClient

Function TestBadURLsIndexClient

remote_test.go:74–88  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

72}
73
74func 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
90func TestGroupIndexClientsByHostPort(t *testing.T) {
91 c0 := &IndexClient{

Callers

nothing calls this directly

Calls 2

DocCountMethod · 0.95
SearchMethod · 0.95

Tested by

no test coverage detected