From 49f1208ab46b7690e2bb093a37d96c11ce58e30e Mon Sep 17 00:00:00 2001 From: Jos Kraaijeveld Date: Fri, 15 Mar 2024 09:06:21 -0700 Subject: [PATCH] Update changelog, cursor -> lastcursor --- client_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client_test.go b/client_test.go index 9fe868a8..9a3500ec 100644 --- a/client_test.go +++ b/client_test.go @@ -1542,23 +1542,23 @@ func Test_Client_JobList(t *testing.T) { res, err := client.JobList(ctx, NewJobListParams().States(rivertype.JobStateAvailable).After(JobListCursorFromJob(job1, JobListOrderByTime))) require.NoError(t, err) require.Equal(t, []int64{job2.ID}, sliceutil.Map(res.Jobs, func(job *rivertype.JobRow) int64 { return job.ID })) - require.Equal(t, job2.ID, res.Cursor.id) + require.Equal(t, job2.ID, res.LastCursor.id) res, err = client.JobList(ctx, NewJobListParams().States(rivertype.JobStateRunning).After(JobListCursorFromJob(job3, JobListOrderByTime))) require.NoError(t, err) require.Equal(t, []int64{job4.ID}, sliceutil.Map(res.Jobs, func(job *rivertype.JobRow) int64 { return job.ID })) - require.Equal(t, job4.ID, res.Cursor.id) + require.Equal(t, job4.ID, res.LastCursor.id) res, err = client.JobList(ctx, NewJobListParams().States(rivertype.JobStateCompleted).After(JobListCursorFromJob(job5, JobListOrderByTime))) require.NoError(t, err) require.Equal(t, []int64{job6.ID}, sliceutil.Map(res.Jobs, func(job *rivertype.JobRow) int64 { return job.ID })) - require.Equal(t, job6.ID, res.Cursor.id) + require.Equal(t, job6.ID, res.LastCursor.id) res, err = client.JobList(ctx, NewJobListParams().OrderBy(JobListOrderByScheduledAt, SortOrderAsc).After(JobListCursorFromJob(job4, JobListOrderByScheduledAt))) require.NoError(t, err) require.Equal(t, []int64{job1.ID, job3.ID, job2.ID}, sliceutil.Map(res.Jobs, func(job *rivertype.JobRow) int64 { return job.ID })) - require.Equal(t, JobListOrderByScheduledAt, res.Cursor.sortField) - require.Equal(t, job2.ID, res.Cursor.id) + require.Equal(t, JobListOrderByScheduledAt, res.LastCursor.sortField) + require.Equal(t, job2.ID, res.LastCursor.id) }) t.Run("MetadataOnly", func(t *testing.T) {