From 3dba6c31e800e3d2b5a227d9f65017530fc756aa Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Fri, 19 Apr 2024 10:13:38 +0200 Subject: [PATCH] rm skipped TestRPC --- web/e2e_test.go | 57 ------------------------------------------------- 1 file changed, 57 deletions(-) diff --git a/web/e2e_test.go b/web/e2e_test.go index 0f946099..5cbb63d1 100644 --- a/web/e2e_test.go +++ b/web/e2e_test.go @@ -961,63 +961,6 @@ func TestHealthz(t *testing.T) { } } -func TestRPC(t *testing.T) { - t.Skip("TODO grpc and jsonrpc") - - b, err := zoekt.NewIndexBuilder(&zoekt.Repository{ - Name: "name", - URL: "repo-url", - CommitURLTemplate: "{{.Version}}", - FileURLTemplate: "file-url", - LineFragmentTemplate: "#line", - Branches: []zoekt.RepositoryBranch{{Name: "master", Version: "1234"}}, - }) - if err != nil { - t.Fatalf("NewIndexBuilder: %v", err) - } - if err := b.Add(zoekt.Document{ - Name: "f2", - Content: []byte("to carry water in the no later bla"), - // --------------0123456789012345678901234567890123 - // --------------0 1 2 3 - Branches: []string{"master"}, - }); err != nil { - t.Fatalf("Add: %v", err) - } - - s := searcherForTest(t, b) - srv := Server{ - Searcher: s, - RPC: true, - Top: Top, - } - - mux, err := NewMux(&srv) - if err != nil { - t.Fatalf("NewMux: %v", err) - } - - ts := httptest.NewServer(mux) - defer ts.Close() - - //endpoint := ts.Listener.Addr().String() - - client := zoekt.Searcher(nil) // TODO grpc and jsonrpc - - ctx := context.Background() - q := &query.Substring{Pattern: "water"} - opts := &zoekt.SearchOptions{ChunkMatches: true} - opts.SetDefaults() - results, err := client.Search(ctx, q, opts) - if err != nil { - t.Fatal(err) - } - - assertResults(t, results.Files, "f2: to carry water in the no later bla") - - // TODO List, StreamSearch -} - func assertResults(t *testing.T, files []zoekt.FileMatch, want string) { t.Helper()