test: TIP-1011 enhanced access key permissions coverage#3430
Open
test: TIP-1011 enhanced access key permissions coverage#3430
Conversation
Adds 19 unit tests targeting mutation test survivors in key_authorization, call_scope_allows_call, and validate_t3_key_authorization_restrictions. Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d4d32-4300-71d9-8d91-632c2147c49d
|
Group call_scope tests into single test_call_scope_allows_call_branches, t3 restriction tests into test_t3_key_authorization_restriction_rejections, and pre-T3 gate tests into test_pre_t3_rejects_tip1011_fields. Extract allows() and abi_input() helpers plus t3_validate() to reduce boilerplate. Co-Authored-By: grandizzy <38490174+grandizzy@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d4d32-4300-71d9-8d91-632c2147c49d
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.
Targets mutation test survivors from TIP-1011 (#3384). Adds 19 compact
unit tests covering branches that cargo-mutants flagged as unkilled:
call_scope_allows_call: 10 tests exercising all 12 branches (None/empty scopes,create tx, target mismatch, selector match/mismatch, short input, recipient
check, dirty ABI padding)
validate_t3_key_authorization_restrictions: 5 tests for too-many selectorrules, duplicate selectors, too-many recipients, zero-address recipient,
non-constrained selector with recipients
KeyAuthorizationhelpers: 2 tests forhas_periodic_limitsandhas_call_scopesbranch coverageCo-Authored-By: grandizzy 38490174+grandizzy@users.noreply.github.com
Prompted by: georgen