Unified storage bugfix legacy folders getting first page (#109554)

* When creating a new continue token, it defaults to page 1. Also use constants for default limit and page number.

* Update tests for continue token.

* When listing legacy folders, the continue token will have all paging info in it. Simplifies paging logic and fixes bug when limit not specified.

* Adds regression test to ensure default page limit is enforced.

* remove test comment
This commit is contained in:
owensmallwood
2025-08-13 08:50:28 -06:00
committed by GitHub
parent 8134919536
commit 384ec28dfd
4 changed files with 39 additions and 16 deletions
+5 -1
View File
@@ -14,9 +14,13 @@ type continueToken struct {
limit int64
}
const defaultPageLimit = 100
const defaultPageNumber = 1
func readContinueToken(options *internalversion.ListOptions) (*continueToken, error) {
t := &continueToken{
limit: 100, // default page size
limit: defaultPageLimit, // default page size
page: defaultPageNumber, // default page number
}
if options.Continue == "" {
if options.Limit > 0 {