Skip to content

Commit

Permalink
fix: total number of test suite executions should ignore paging filte…
Browse files Browse the repository at this point in the history
…rs (#4530)
  • Loading branch information
rangoo94 authored Oct 26, 2023
1 parent b29546f commit 2d17570
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/app/api/v1/testsuites.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
"math"
"net/http"
"sort"
"strconv"
Expand Down Expand Up @@ -622,8 +623,9 @@ func (s TestkubeAPI) ListTestSuiteExecutionsHandler() fiber.Handler {
return s.Error(c, http.StatusInternalServerError, fmt.Errorf("%s: client could not get executions totals: %w", errPrefix, err))
}
l.Debugw("got executions totals", "totals", executionsTotals, "time", time.Since(now))
nameFilter := testresult.NewExecutionsFilter().WithName(c.Query("id", ""))
allExecutionsTotals, err := s.TestExecutionResults.GetExecutionsTotals(ctx, nameFilter)
filterAllTotals := *filter.(*testresult.FilterImpl)
filterAllTotals.WithPage(0).WithPageSize(math.MaxInt64)
allExecutionsTotals, err := s.TestExecutionResults.GetExecutionsTotals(ctx, filterAllTotals)
if err != nil {
return s.Error(c, http.StatusInternalServerError, fmt.Errorf("%s: client could not get all executions totals: %w", errPrefix, err))
}
Expand Down

0 comments on commit 2d17570

Please sign in to comment.