Skip to content

Commit

Permalink
chore: lint and handle setup error
Browse files Browse the repository at this point in the history
  • Loading branch information
luigibarbato committed Sep 7, 2023
1 parent 662a806 commit 116835e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions index_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1510,9 +1510,12 @@ func TestIndex_SearchWithVectorStore(t *testing.T) {
},
}

SetUpIndexWithVector(testArg.UID)
i, err := SetUpIndexWithVector(testArg.UID)
if err != nil{
t.Fatal(err)
}

c := testArg.client
i := c.Index(testArg.UID)
t.Cleanup(cleanup(c))

got, err := i.Search(testArg.query, &testArg.request)
Expand Down
6 changes: 3 additions & 3 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ func SetUpIndexWithVector(indexUID string) (resp *Index, err error) {
})

req := internalRequest{
endpoint: "/experimental-features",
method: http.MethodPatch,
endpoint: "/experimental-features",
method: http.MethodPatch,
contentType: "application/json",
withRequest: map[string]interface{}{
"vectorStore": true,
},
}

if err := client.executeRequest(req); err != nil {
panic(err)
return nil, err
}

index := client.Index(indexUID)
Expand Down

0 comments on commit 116835e

Please sign in to comment.