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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user