test(robot-server): Check the number of returned commands in persistence snapshot tests #14466
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
robot-server's persistence snapshot tests currently only check that the server can return some number of run commands. They don't check that the server returns the correct number, or the correct contents. That was good enough before, but it's dicey now because we're doing a bunch of database migration stuff in this release that deals with commands. (e.g. #14348, #14465.)
This PR asserts that the server returns the correct number of commands. Because of time constraints, we're still not attempting to check that the contents are correct—that's RSS-213.
Test Plan
I've run these tests on a commit before all of v7.2.0's database changes, to be more certain that we're locking in good numbers instead of bad numbers.
Changelog
Review requests
None in particular.
Risk assessment
Very low.