Skip to content

test(auth): assert exact escrow authorization trees - #263

Open
Bkizzy16 wants to merge 2 commits into
DocForum:mainfrom
Bkizzy16:fix/issue-105
Open

Bkizzy16 wants to merge 2 commits into
DocForum:mainfrom
Bkizzy16:fix/issue-105

Conversation

@Bkizzy16

Copy link
Copy Markdown
Contributor

Summary

  • Add a reusable assertion for the addresses authorized by the last invocation.
  • Pin create_escrow payer authorization to its exact invocation tree, including the nested token transfer.
  • Use exact caller invocation mocks in release and refund tests, including wrong-caller cases, and update Soroban auth snapshots.

This is an incremental contribution to #105, not the full issue completion: other escrow test modules still contain mock_all_auths() and need conversion before the issue can be closed.

Validation

  • cargo test --manifest-path contracts/escrow/Cargo.toml --test create_escrow — passed (7 tests).
  • cargo test --manifest-path contracts/escrow/Cargo.toml --test release_refund — passed (7 tests).
  • git diff --check — passed.

Part of #105.

@github-actions github-actions Bot added the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 27, 2026
@github-actions

Copy link
Copy Markdown

@Bkizzy16 This PR now has merge conflicts with main, most likely because #241 (feat(sdk): network presets with explicit mainnet opt-in guard) was just merged, so it can't be merged until it's rebased:

git fetch upstream            # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-lease

The usual culprits are shared docs like ROADMAP.md and ARCHITECTURE*.md. If the conflict is in the ROADMAP.md changelog, move your entry into a new file under changelog.d/ (see changelog.d/README.md) rather than resolving it in place, so it can't conflict again. CI re-runs when you push, and the needs-rebase label is removed automatically once the conflicts are resolved.

Automated message. It won't repeat unless the PR conflicts again after your next push.

@zeemscript

Copy link
Copy Markdown

Hi @afeezorobsco-cyber — I updated PR #263 onto current main and resolved the roadmap conflict while preserving the authorization-tree test entry. GitHub reports the branch mergeable; the latest malware scan passes, and the previous contract/SDK test checks passed. Please rerun/approve full CI on the updated head.

@github-actions github-actions Bot removed the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 27, 2026
@afeezorobsco-cyber

Copy link
Copy Markdown
Contributor

@Bkizzy16 After merging main, the contract tests no longer compile:

error[E0061]: this method takes 11 arguments but 9 arguments were supplied

#209 (protocol fee) added two parameters to create_escrow: fee_recipient: Option<Address> and fee_bps: Option<u32>. Your new auth tests still call it with 9 arguments. Pass &None, &None for the two new arguments (as the other tests on main do), run cargo test in contracts/escrow, and push.

@github-actions github-actions Bot added the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 28, 2026
@github-actions

Copy link
Copy Markdown

@Bkizzy16 This PR now has merge conflicts with main, most likely because #238 (feat(contract): emit lifecycle events on create, release, and refund (%239)) was just merged, so it can't be merged until it's rebased:

git fetch upstream            # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-lease

The usual culprits are shared docs like ROADMAP.md and ARCHITECTURE*.md. If the conflict is in the ROADMAP.md changelog, move your entry into a new file under changelog.d/ (see changelog.d/README.md) rather than resolving it in place, so it can't conflict again. CI re-runs when you push, and the needs-rebase label is removed automatically once the conflicts are resolved.

Automated message. It won't repeat unless the PR conflicts again after your next push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Has merge conflicts with main; the author needs to rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants