-
Notifications
You must be signed in to change notification settings - Fork 37
fix: migrate integration tests to production dlp without unit_test_config #630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
AvhiMaz
wants to merge
6
commits into
magicblock-labs:master
Choose a base branch
from
AvhiMaz:fix/issue-602-production-dlp-validator-authority
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
53edf33
fix: migrate integration tests to production dlp without unit_test_co…
AvhiMaz 953edd8
fix: use production dlp for integration tests
AvhiMaz 518d137
fix: update deprecation version to match test-integration workspace
AvhiMaz ed1441b
fix: fix formatting issue
AvhiMaz b610861
fix: add validator field & update related functions
AvhiMaz 71aad51
Merge branch 'master' into fix/issue-602-production-dlp-validator-aut…
GabrielePicco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -430,6 +430,11 @@ fn assert_cannot_increase_committee_count( | |
| ); | ||
| let (tx_result_err, tx_err) = extract_transaction_error(tx_res); | ||
| if let Some(tx_err) = tx_err { | ||
| use solana_sdk::transaction::TransactionError; | ||
| if matches!(tx_err, TransactionError::InvalidWritableAccount) { | ||
| return; | ||
| } | ||
|
Comment on lines
+433
to
+436
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Consider moving the The inline ♻️ Suggested refactor+use solana_sdk::transaction::TransactionError;
+
fn assert_cannot_increase_committee_count(
pda: Pubkey,
payer: &Keypair,
rpc_client: &RpcClient,
) {
// ... existing code ...
let (tx_result_err, tx_err) = extract_transaction_error(tx_res);
if let Some(tx_err) = tx_err {
- use solana_sdk::transaction::TransactionError;
if matches!(tx_err, TransactionError::InvalidWritableAccount) {
return;
}🤖 Prompt for AI Agents |
||
|
|
||
| assert_is_one_of_instruction_errors( | ||
| tx_err, | ||
| &tx_result_err, | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| #![allow(deprecated)] | ||
|
|
||
| use std::str::FromStr; | ||
|
|
||
| use cleanass::{assert, assert_eq}; | ||
|
|
||
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
2 changes: 2 additions & 0 deletions
2
test-integration/test-ledger-restore/tests/06_delegated_account.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| #![allow(deprecated)] | ||
|
|
||
| use std::{path::Path, process::Child}; | ||
|
|
||
| use cleanass::assert_eq; | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
test-integration/test-magicblock-api/tests/test_claim_fees.rs
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| #![allow(deprecated)] | ||
|
|
||
| use std::{ | ||
| error::Error, | ||
| io, | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| #![allow(deprecated)] | ||
|
|
||
| use std::{process::Child, str::FromStr, time::Duration}; | ||
|
|
||
| use integration_test_tools::{ | ||
|
|
||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Guard against missing validator identity before escrow initialization.
Line 244-249 passes
Nonewhenephem_validator_identityis unset, which may lead to escrow delegation without a validator. If production DLP requires a validator, fail fast to make the error explicit.✅ Suggested guard
📝 Committable suggestion
🤖 Prompt for AI Agents