test(e2e): use -o name and wc -l for pagination count checks#419
Merged
test(e2e): use -o name and wc -l for pagination count checks#419
Conversation
✅ Deploy Preview for jumpstarter-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e785fa7 to
79cefd2
Compare
1397b6d to
aa5cfc3
Compare
Member
|
@ambient-code please rebase |
This change makes the pagination E2E tests more robust: 1. Wrap each resource creation in `run` + `assert_success` so a failing creation is reported at the exact failing iteration rather than silently skipped, making failures much easier to diagnose. 2. Replace the `-o yaml` + `grep -c '^ *name:'` pattern with `-o name | wc -l`. The name output format emits exactly one line per resource, so `wc -l` is an unambiguous count that needs no text parsing at all and is correct regardless of YAML schema changes. 3. Wrap the list+count block in a short retry loop (up to 5 attempts, 2 s apart) so a single transient API hiccup does not immediately fail the test. Closes #415
aa5cfc3 to
07fe1f0
Compare
mangelajo
approved these changes
Apr 8, 2026
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.
Summary
Cleans up the two pagination E2E tests to use a simpler and more reliable counting method.
Changes
-o name | wc -linstead of-o yaml+ grepThe old approach used
jmp get ... -o yamland then countedname:occurrences with grep — fragile and hard to read.The
-o nameoutput format emits exactly one line per resource (the resource name), sowc -lis an unambiguous, zero-parsing count:Explicit error checking in creation loops
Each creation command is now wrapped in
run+assert_successso a failing creation is caught at the exact failing iteration.🤖 Generated with Claude Code