Verify paging against a real server, and check the published bounds - #14
Merged
Conversation
Two additions. The workflow now reads the paging bounds from system/info and cross-checks them against x-fog-paging in the document, so the two cannot drift apart unnoticed. More importantly it exercises paging against the live server, which nothing did before. The suite's paging tests are all mocked, and its real-server contexts create one host and one group - you cannot page one row. So the truncation fix had never made a paged request to a real server. This seeds 25 hosts, asks for them at a page size of 4, and checks the walk returned every row with none repeated across boundaries, that -First stops early, and that Get-FogHosts agrees with host/count. That last one is the check that would have caught the original bug on any server, without needing ten thousand rows. It runs before the suite so the known Pester 6 failure cannot mask it, and the clone/settings work moves into its own step now that two steps need it. TEMP: the self-test is pinned at api-paging-limits and the FogApi paging branch to prove both. Reverted before merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two things to the API validation workflow.
Reads the paging bounds from
system/infoand cross-checks them againstx-fog-pagingin the OpenAPI document, so the two cannot drift apart unnoticed. Depends on FOGProject/fogproject#1046.Exercises paging against the live server, which nothing did before. FogApi's paging tests are all mocked, and the real-server contexts create one host and one group — you cannot page one row. So the truncation fix had never made a paged request to a real server, which is precisely what it was about.
The new step seeds 25 hosts, asks for them at a page size of 4, and checks:
-First 6stopped at sixGet-FogHostsagrees withhost/countThat last one is the check that would have caught the original bug on any server, without needing ten thousand rows —
/countreports the true filtered total and ignores paging, so it is an independent answer.It runs before the suite so the known Pester 6 failure cannot mask it, and the clone/settings work moves into its own step now that two steps need it.
api-paging-limitsandfix/fog16-paging-truncationto prove both. Reverted before merge.