Skip to content

Commit

Permalink
Remove includeCursor query parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com>
  • Loading branch information
eamansour committed Aug 21, 2024
1 parent 37cf313 commit 9bd3a62
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion pkg/runs/runsDownload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ func WriteMockRasRunsResponse(

writer.Write([]byte(fmt.Sprintf(`
{
"nextCursor": "",
"pageSize": 1,
"amountOfRuns": %d,
"runs":[ %s ]
Expand Down
4 changes: 2 additions & 2 deletions pkg/runs/runsGet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion pkg/runs/runsGet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ const (

EMPTY_RUNS_RESPONSE = `
{
"nextCursor": "",
"pageSize": 1,
"amountOfRuns": 0,
"runs":[]
Expand Down

0 comments on commit 9bd3a62

Please sign in to comment.