Repository navigation
test(#756): pin KMS's projections and record them - #1347
Merged
Merged
Conversation
KMSKey declares AccountID, Region and ever_tagged, and none reaches a response: CreateKey and DescribeKey answer KeyMetadata built member by member, whose published AWSAccountId is the service's own data, and every other operation answers a map of published members. emulator/kms_wire_test.go drives all twenty-four routed operations, tagging the key and reading ever_tagged back before walking any response. check-wire-bookkeeping goes from 246 projected across 103 records to 249 across 104, and from 64 still reachable to 61. #756 stays open.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 tasks done
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 ten PRs in #756's 3-line block. Like IAM, it is citation only: no
production code changes.
KMS is already projected
KMSKeydeclaresAccountIDandRegion, plusEverTaggedasever_tagged,omitempty. None ofthem reaches a body:
CreateKeyandDescribeKeyanswerKeyMetadatafromkmsKeyMetadata(
emulator/kms_key_metadata.go), which builds the map member by member.KeyMetadatapublishesAWSAccountId, which is fed from the record's account. That is the service'sown data, not a leak, and the equality fold does not confuse it with
AccountID.What the new test asserts
emulator/kms_wire_test.godrives all twenty-four routed operations with the sharedwireAssertNoMemberJSON:It reads
AccountIDandRegionback from the stored record. It then tags the key and readsever_tagged: trueback before walking any response (#938, #1304).Negative controls (each run, then restored;
kms_key_metadata.goverified diff-free)Regionadded tokmsKeyMetadatafailed exactlyCreateKeyandDescribeKey, which are thetwo operations that answer
KeyMetadata.TagResourceremoved fails at theever_taggedread-back.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.