diff --git a/index_search_test.go b/index_search_test.go index 9680987c..c9cbf53d 100644 --- a/index_search_test.go +++ b/index_search_test.go @@ -919,13 +919,13 @@ func TestIndex_SearchWithSort(t *testing.T) { func TestIndex_SearchOnNestedFileds(t *testing.T) { type args struct { - UID string - PrimaryKey string - client *Client - query string - request SearchRequest + UID string + PrimaryKey string + client *Client + query string + request SearchRequest searchableAttribute []string - sortableAttribute []string + sortableAttribute []string } tests := []struct { name string @@ -1021,9 +1021,9 @@ func TestIndex_SearchOnNestedFileds(t *testing.T) { { name: "TestIndexSearchOnNestedFieldsWithSortableAttribute", args: args{ - UID: "TestIndexSearchOnNestedFieldsWithSortableAttribute", - client: defaultClient, - query: "An awesome", + UID: "TestIndexSearchOnNestedFieldsWithSortableAttribute", + client: defaultClient, + query: "An awesome", request: SearchRequest{ Sort: []string{ "info.reviewNb:desc", diff --git a/main_test.go b/main_test.go index 1afd9efb..3d6da0db 100644 --- a/main_test.go +++ b/main_test.go @@ -141,13 +141,13 @@ func SetUpIndexWithNestedFields(indexUID string) { index := client.Index(indexUID) documents := []map[string]interface{}{ - {"id": 1, "title": "Pride and Prejudice", "info": map[string]interface{}{"comment": "A great book", "reviewNb": 50}}, - {"id": 2, "title": "Le Petit Prince", "info": map[string]interface{}{"comment": "A french book", "reviewNb": 600}}, - {"id": 3, "title": "Le Rouge et le Noir", "info": map[string]interface{}{"comment": "Another french book", "reviewNb": 700}}, - {"id": 4, "title": "Alice In Wonderland", "comment": "A weird book", "info": map[string]interface{}{"comment": "A weird book", "reviewNb": 800}}, - {"id": 5, "title": "The Hobbit", "info": map[string]interface{}{"comment": "An awesome book", "reviewNb": 900}}, - {"id": 6, "title": "Harry Potter and the Half-Blood Prince", "info": map[string]interface{}{"comment": "The best book", "reviewNb": 1000}}, - {"id": 7, "title": "The Hitchhiker's Guide to the Galaxy"}, + {"id": 1, "title": "Pride and Prejudice", "info": map[string]interface{}{"comment": "A great book", "reviewNb": 50}}, + {"id": 2, "title": "Le Petit Prince", "info": map[string]interface{}{"comment": "A french book", "reviewNb": 600}}, + {"id": 3, "title": "Le Rouge et le Noir", "info": map[string]interface{}{"comment": "Another french book", "reviewNb": 700}}, + {"id": 4, "title": "Alice In Wonderland", "comment": "A weird book", "info": map[string]interface{}{"comment": "A weird book", "reviewNb": 800}}, + {"id": 5, "title": "The Hobbit", "info": map[string]interface{}{"comment": "An awesome book", "reviewNb": 900}}, + {"id": 6, "title": "Harry Potter and the Half-Blood Prince", "info": map[string]interface{}{"comment": "The best book", "reviewNb": 1000}}, + {"id": 7, "title": "The Hitchhiker's Guide to the Galaxy"}, } task, err := index.AddDocuments(documents) if err != nil { diff --git a/version_test.go b/version_test.go index 3a6a0e90..a1488391 100644 --- a/version_test.go +++ b/version_test.go @@ -1,12 +1,12 @@ package meilisearch import ( - "testing" "fmt" "regexp" + "testing" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestVersion_GetQualifiedVersion(t *testing.T) {