-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#3502) Return the PageSize if specified #3547
Conversation
This PR is in draft while I formalize the testing and other aspects of it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it works correctly in testing, and the code looks pretty code so far. Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, but am realising we should definitely add a regression test for this in terms of functionality.
If a page size has been specified, use it. Also emit a warning if it's something other than 30 as there are known issues with some feeds.
The integration test for PageSize broke because the message was changed in chocolatey#3507. This updated the test to use the new wording.
Add tests to exercise the messages added for page sizes and ensure they are behaving as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good, thanks for sorting this out! 💜
Description Of Changes
If a page size has been specified, use it. Also emit a warning if it's something other than 30 as there are known issues with some feeds.
Motivation and Context
Make a few things clearer and easier when working with Sleet and other feeds.
Testing
choco search -s http://localhost/index.json
.choco search -s http://localhost/index.json --page-size 5
.choco search -s http://localhost/index.json --page-size 50
.choco search -s http://localhost/index.json --page-size 500
.choco search -s http://localhost/index.json --page-size 100
.Operating Systems Testing
Change Types Made
Change Checklist
Related Issue