Skip to content

Commit

Permalink
test: Remove unused Client parameter from addOneObject function
Browse files Browse the repository at this point in the history
  • Loading branch information
aseure committed Oct 11, 2017
1 parent 688e76a commit 13edced
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion algoliasearch/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func TestClientOperations(t *testing.T) {
t.Parallel()
c, i := initClientAndIndex(t, "TestClientOperations")

objectID := addOneObject(t, c, i)
objectID := addOneObject(t, i)

t.Log("TestClientOperations: Test CopyIndex")
{
Expand Down
15 changes: 8 additions & 7 deletions algoliasearch/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestIndexOperations(t *testing.T) {
t.Parallel()
c, i := initClientAndIndex(t, "TestIndexOperations")

objectID := addOneObject(t, c, i)
objectID := addOneObject(t, i)

t.Log("TestIndexOperations: Test Copy")
{
Expand Down Expand Up @@ -894,9 +894,9 @@ func deleteAllIndexKeys(t *testing.T, i Index) {

func TestIndexKeys(t *testing.T) {
t.Parallel()
c, i := initClientAndIndex(t, "TestIndexKeys")
_, i := initClientAndIndex(t, "TestIndexKeys")

addOneObject(t, c, i)
addOneObject(t, i)

deleteAllIndexKeys(t, i)

Expand Down Expand Up @@ -975,9 +975,9 @@ func TestIndexKeys(t *testing.T) {

func TestSettingsToMap(t *testing.T) {
t.Parallel()
c, i := initClientAndIndex(t, "TestSettingsToMap")
_, i := initClientAndIndex(t, "TestSettingsToMap")

addOneObject(t, c, i)
addOneObject(t, i)

t.Log("TestSettingsToMap: Get the original settings")
settingsBefore, err := i.GetSettings()
Expand Down Expand Up @@ -1128,8 +1128,9 @@ func TestSearchForFacetValues(t *testing.T) {

func TestGeoSearchParameters(t *testing.T) {
t.Parallel()
c, i := initClientAndIndex(t, "TestGeoSearchParameters")
addOneObject(t, c, i)
_, i := initClientAndIndex(t, "TestGeoSearchParameters")

addOneObject(t, i)

t.Log("TestGeoSearchParameters: Test valid parameters")
{
Expand Down
2 changes: 1 addition & 1 deletion algoliasearch/testing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func waitTasksAsync(t *testing.T, i Index, tasks []int) {

// addOneObject is used to add a single dummy object to the index. This way, we
// make sure the index has been created (and not only initialized).
func addOneObject(t *testing.T, c Client, i Index) string {
func addOneObject(t *testing.T, i Index) string {
object := Object{"attribute": "value"}

res, err := i.AddObject(object)
Expand Down

0 comments on commit 13edced

Please sign in to comment.