Repository navigation
test(contracts): name the refusals added since the last pass - #422
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hpmaxi
marked this pull request as ready for review
November 2, 2026 16:23
luchobonatti
approved these changes
Nov 2, 2026
13 tasks
This branch was successfully deployed
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.
Summary
Closes #419
14 bare
is_err()refusals added since #397 now assert the exact error: the contract's own error, the specific access-control error, or the host's own missing-signature error through the existingmissing_authhelper.Changes
cancel.rs: a deploy above the free reserve now assertsReserveCommittedToExits.compliance.rs: a share transfer by a delisted holder assertsIdentityVerificationFailed; by a frozen holder assertsAddressFrozen.deposit_cap.rs:set_deposit_capsigned by the wrong account asserts the missing-signature error.events.rs:request_depositof 0 assertsInvalidAmount.notice.rs:set_noticewith no signature asserts the missing-signature error.sealing.rs:set_min_epoch_durationwith no signature, andclose_epochby an outsider, both assert the missing-signature error.settlement.rs: a claim refused by a compliance module that refuses every mint assertsMintNotCompliant.setup.rs:accept_admin_transferafter a cancelled hand-over assertsNoPendingTransfer;finish_setupsigned by the wrong account asserts the missing-signature error.identity-verifier/test.rs:allowsigned by a stranger asserts the missing-signature error (both directions);verify_identityfor an unallowed account assertsIdentityVerificationFailed. Added a smallmissing_authhelper, matching the one the vault's and the other contracts' test suites already have.Test plan
Automated tests
cargo test --locked -p async-vault -p identity-verifier -p compliance -p nav-oracle -p share-token— 526 (async-vault), 7 (identity-verifier), 42 (compliance), 111 (nav-oracle), 114 (share-token) passed, 0 failed, unchanged from before the rewrite.cargo test --locked(full workspace) — all green.cargo clippy --workspace --all-targets --locked -- -D warnings— clean.cargo fmt --all -- --check— clean.git grep 'is_err())' -- 'contracts/**/test*.rs' 'contracts/**/test/*.rs'— no matches.is_err()) caught it:ReserveCommittedToExitsforInvalidAmountin the free-reserve guard —test::cancel::refundable_escrow_is_not_free_reservefailed on the wrong error code.IdentityVerificationFailedforAddressFrozenin the identity-verifier stub —test::verify_identity_checks_allowlistfailed on the wrong error code.Manual verification
None needed; this is a test-only change.
Breaking changes
None.