Skip to content

Commit

Permalink
fix: covered task query
Browse files Browse the repository at this point in the history
  • Loading branch information
Ja7ad committed Nov 6, 2024
1 parent 359433e commit eb62ceb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ func TestIndex_GetTasks(t *testing.T) {
{ID: "123", Name: "Pride and Prejudice"},
},
query: &TasksQuery{
Limit: 5,
From: 1,
Statuses: []TaskStatus{TaskStatusSucceeded},
Types: []TaskType{TaskTypeDocumentAdditionOrUpdate},
IndexUIDS: []string{"indexUID"},
Limit: 10,
From: 1,
Statuses: []TaskStatus{TaskStatusSucceeded},
Types: []TaskType{TaskTypeDocumentAdditionOrUpdate},
},
},
},
Expand All @@ -168,10 +169,9 @@ func TestIndex_GetTasks(t *testing.T) {
_, err = c.WaitForTask(task.TaskUID, 0)
require.NoError(t, err)

gotResp, err := i.GetTasks(nil)
gotResp, err := i.GetTasks(tt.args.query)
require.NoError(t, err)
require.NotNil(t, (*gotResp).Results[0].Status)
require.NotZero(t, (*gotResp).Results[0].UID)
require.NotNil(t, (*gotResp).Results[0].Type)
})
}
Expand Down

0 comments on commit eb62ceb

Please sign in to comment.