diff --git a/pkg/runs/runsDownload_test.go b/pkg/runs/runsDownload_test.go index da726600..06d48490 100644 --- a/pkg/runs/runsDownload_test.go +++ b/pkg/runs/runsDownload_test.go @@ -250,7 +250,6 @@ func WriteMockRasRunsResponse( writer.Write([]byte(fmt.Sprintf(` { - "nextCursor": "", "pageSize": 1, "amountOfRuns": %d, "runs":[ %s ] diff --git a/pkg/runs/runsGet.go b/pkg/runs/runsGet.go index 851385c5..ac7ef01f 100644 --- a/pkg/runs/runsGet.go +++ b/pkg/runs/runsGet.go @@ -233,7 +233,7 @@ func GetRunsFromRestApi( var runData *galasaapi.RunResults var httpResponse *http.Response log.Printf("Requesting page '%d' ", pageNumberWanted) - apicall := apiClient.ResultArchiveStoreAPIApi.GetRasSearchRuns(context).ClientApiVersion(restApiVersion).IncludeCursor("true") + apicall := apiClient.ResultArchiveStoreAPIApi.GetRasSearchRuns(context).ClientApiVersion(restApiVersion) if fromAgeMins != 0 { apicall = apicall.From(fromTime) } @@ -274,7 +274,7 @@ func GetRunsFromRestApi( results = append(results, runsOnThisPage...) // If the page cursor is the same, then we've gone through all pages - if pageCursor == runData.GetNextCursor() || runData.GetNextCursor() == "" { + if pageCursor == runData.GetNextCursor() || !runData.HasNextCursor() { gotAllResults = true } else { pageCursor = runData.GetNextCursor() diff --git a/pkg/runs/runsGet_test.go b/pkg/runs/runsGet_test.go index 2937fb78..1a9968c4 100644 --- a/pkg/runs/runsGet_test.go +++ b/pkg/runs/runsGet_test.go @@ -86,7 +86,6 @@ const ( EMPTY_RUNS_RESPONSE = ` { - "nextCursor": "", "pageSize": 1, "amountOfRuns": 0, "runs":[]