Skip to content

tests: fix ProgramTest program selection#595

Merged
2501babe merged 1 commit intosolana-program:mainfrom
2501babe:20260402_v5fix
Apr 3, 2026
Merged

tests: fix ProgramTest program selection#595
2501babe merged 1 commit intosolana-program:mainfrom
2501babe:20260402_v5fix

Conversation

@2501babe
Copy link
Copy Markdown
Member

@2501babe 2501babe commented Apr 3, 2026

add_upgradeable_program_to_genesis() is broken (again?) and we were testing against whatever bpf stake we got from ProgramTest 😞 i realized while working on #581 i was getting test states that, given minimum delegation, ought to be impossible

* replace `add_upgradeable_program_to_genesis()` with `add_program()`
* remove small deposit/withdraw cases, minimum delegation disallows these
* account for upstream merge improvement to merge excess lamports
@2501babe 2501babe self-assigned this Apr 3, 2026
@2501babe 2501babe marked this pull request as ready for review April 3, 2026 07:07
@2501babe 2501babe requested a review from joncinque April 3, 2026 07:07
Copy link
Copy Markdown
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Lovely!

Comment thread program/tests/deposit.rs
// remove branch after v5 is stable
alice_stake_before_deposit + rent_exempt_reserve
} else {
alice_stake_before_deposit + rent_exempt_reserve + alice_extra_lamports
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's very nice that your test catches this case

@2501babe 2501babe merged commit 0a1230f into solana-program:main Apr 3, 2026
22 checks passed
@2501babe 2501babe deleted the 20260402_v5fix branch April 3, 2026 10:52
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