Skip to content

Conversation

@rustopian
Copy link
Contributor

@rustopian rustopian commented Dec 17, 2025

Problem
solana-program-test is on its slow way out.

Solution
Convert these tests to Mollusk, including simple but perfectly equivalent stake tracking.

This part migrates Initialize and InitializeChecked tests, and only includes helper utilities relevant to these tests. (Some lifecycle management and all stake history management is not yet required and is saved for later PRs.)

Included:

  • Add simple StakeTestContext pattern
  • Migrate Initialize tests to mollusk, out of program_test.rs to initialize.rs
  • Start relocation of StakeLifecycle management to a helper file
  • test_case is used to run all Initialize tests against InitializeChecked as well
  • added wrong owner test
  • every instruction runs test_missing_signers unless this is explicitly set to false

This does NOT migrate tests from the newer stake_instruction.rs, which already uses Mollusk.


impl StakeLifecycle {
/// Create an uninitialized stake account
pub fn create_uninitialized_account(self) -> AccountSharedData {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stand-in for now; full Lifecycle management is added in next PR #221

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.

1 participant