Skip to content

Fix post-delegation token transfer test setup#1235

Merged
bmuddha merged 2 commits into
bmuddha/fix/tighten-privileged-accessfrom
post-delegation-token-transfer-fixtures
May 20, 2026
Merged

Fix post-delegation token transfer test setup#1235
bmuddha merged 2 commits into
bmuddha/fix/tighten-privileged-accessfrom
post-delegation-token-transfer-fixtures

Conversation

@GabrielePicco
Copy link
Copy Markdown
Collaborator

@GabrielePicco GabrielePicco commented May 20, 2026

Summary

  • Set up the test mint and regular ATAs with transactions instead of loading them as fixtures.
  • Keep only the delegated eATA accounts and delegation records as fixtures, with eATA/delegation pubkeys derived by the runner.
  • Reuse the existing ATA/eATA derivation helpers and the SPL associated token account instruction helper.

Tests

  • cargo check --package test-runner --bin run-tests
  • cargo test --test 10_post_delegation_token_transfer test_post_delegation_action_executes_spl_token_transfer_100 --profile test -- --test-threads=1 --nocapture

Summary by CodeRabbit

Release Notes

  • Tests

    • Refactored integration test infrastructure to improve token account handling and validation.
    • Updated test configuration to support enhanced account management capabilities.
  • Chores

    • Updated development dependencies for improved testing infrastructure.
    • Added new program configuration to the testing environment.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c3adfeca-c017-4b15-845b-adcbb4767fb8

📥 Commits

Reviewing files that changed from the base of the PR and between e70d644 and 4f48ef2.

⛔ Files ignored due to path filters (2)
  • test-integration/Cargo.lock is excluded by !**/*.lock
  • test-integration/programs/ephemeral-token/ephemeral_token_program.so is excluded by !**/*.so
📒 Files selected for processing (4)
  • test-integration/Cargo.toml
  • test-integration/configs/cloning-conf.devnet.toml
  • test-integration/test-cloning/Cargo.toml
  • test-integration/test-cloning/tests/10_post_delegation_token_transfer.rs

📝 Walkthrough

Walkthrough

This PR refactors the post-delegation token transfer integration test to use associated token accounts (ATAs) derived from deterministic authorities instead of standalone token accounts. The changes add spl-associated-token-account-interface to workspace and dev-dependencies, configure the validator to load the ephemeral token program, update test helper functions to query balances by pubkey, and completely rewrite the test setup to derive ATAs, initialize vault and ephemeral account structures, perform delegation, and verify post-transfer balance changes on ephemeral account clones.

Suggested reviewers

  • snawaz
  • thlorenz
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch post-delegation-token-transfer-fixtures

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@GabrielePicco GabrielePicco marked this pull request as ready for review May 20, 2026 15:38
@GabrielePicco GabrielePicco requested a review from bmuddha May 20, 2026 15:38
@GabrielePicco GabrielePicco marked this pull request as draft May 20, 2026 15:40
@GabrielePicco GabrielePicco force-pushed the post-delegation-token-transfer-fixtures branch from e70d644 to 435ebd2 Compare May 20, 2026 15:53
@GabrielePicco GabrielePicco changed the title Fix post-delegation token transfer test fixtures Fix post-delegation token transfer test setup May 20, 2026
@GabrielePicco GabrielePicco marked this pull request as ready for review May 20, 2026 17:50
@bmuddha bmuddha merged commit 9e38baf into bmuddha/fix/tighten-privileged-access May 20, 2026
33 of 40 checks passed
@bmuddha bmuddha deleted the post-delegation-token-transfer-fixtures branch May 20, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants