chore(robot-server): Add a script to recursively download HTTP resources and screen them for errors #17273
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.
Overview
This adds a script to recursively hit a bunch of robot-server endpoints (all the runs, then all those runs' commands, etc.), report any errors, and optionally save the response bodies to the local filesystem for inspection.
Example terminal output.
Example output directory full of response bodies.
The immediate motivation for this was to double-check my resolution of RQA-3853. But maybe it's generally good to have around?
This is basically the same idea as our persistence compatibility tests. One difference is that those tests run in Pytest, against snapshots that we've checked into the Git repo, whereas this is a script that a human can run against actual robots. Another difference is that those tests currently only check basic facts about the resources ("how many runs", "how many commands"), whereas this can return the resources' actual JSON contents. I think we could refactor their implementations to share a lot of the logic, if we want. This also gets us pretty close to including actual JSON contents in the pytest snapshots, if we want.
Test Plan and Hands on Testing
Review requests
Risk assessment
No risk.