Repository navigation
test(#756): pin EC2's storage and image projections and record them - #1330
Merged
Merged
Conversation
EC2Volume, EC2Snapshot and EC2Image each declare AccountID and Region under wire-visible json tags, six of the inventory's lines, and none reaches a response, for the reason the networking set's PR gives. Three tests extend emulator/ec2_wire_test.go and drive seventeen routed operations. CreateSnapshots, CopySnapshot and RegisterImage each write a record of their own, and each of those is read back from state too. check-wire-bookkeeping goes from 185 projected across 75 records to 191 across 78, and from 134 still reachable to 128, of the same 319 declared. #756 stays open: EC2's compute records follow.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 2, 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.
This is the second of three PRs for EC2 in #756's AC3. It covers the storage and image records, 6
of EC2's 30 baseline lines. As with #1329, no production code changes: EC2 is already projected
in code, and this adds the citations.
What it adds
Three tests extend
emulator/ec2_wire_test.go, driving 17 routed operations with the harness#1329 introduced:
EC2VolumeEC2SnapshotEC2ImageCreateSnapshots,CopySnapshotandRegisterImageeach write a record of their own. Each ofthose records is read back from state and proved to carry both scope members, so a body built
from it is anchored as well.
CreateImage, not a bundled catalog AMI, because a catalog entry isnot a record this account wrote.
Negative control (run, then restored;
ec2_plugin.goverified diff-free)I injected
account_idintovolumeSet,RegionintosnapshotSetandAccountIDintoimagesSet. Exactly the three new tests failed, and none of #1329's seven:Volume/DescribeVolumesImage/DescribeImagesSnapshot/DescribeSnapshotsandSnapshot/CreateSnapshotsThe fourth failure is correct, not noise:
CreateSnapshots' published response renders its own<snapshotSet>of the records it wrote.The ratchet
Verification
All of these pass:
make lint: 0 issues.make test: race,-count=1.docs-reference-check docs-versions version-check discarded-unmarshal-check wire-bookkeeping-check operation-catalog-check operation-docs-check.#756 stays open. PR 3 covers the compute records:
EC2Instance, including itsEverTaggedvacuity trap,
EC2KeyPairwithCreatedAt,EC2LaunchTemplateandEC2PlacementGroup.