Skip to content

Commit 77dceb0

Browse files
committed
fix: integration tests now use prod version to test against
1 parent c52c65b commit 77dceb0

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

.github/workflows/run-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ jobs:
8585
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
8686
cargo test-sbf --features unit_test_config
8787
88+
- name: compile production version for integration tests
89+
run: |
90+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
91+
cargo build-sbf
92+
8893
- name: clean up before integration tests
8994
run: |
9095
cp target/deploy/dlp.so /tmp/dlp.so

src/processor/fast/finalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub fn process_finalize(
136136
(*delegated_account_data).copy_from_slice(&commit_state_data);
137137

138138
// Drop remaining reference before closing accounts
139-
drop(commit_record_data);
139+
drop(commit_record_data);
140140
drop(commit_state_data);
141141

142142
// Closing accounts

tests/integration/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/programs/test-delegation/src/lib.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub const TEST_PDA_SEED_OTHER: &[u8] = b"test-pda-other";
1212
pub mod test_delegation {
1313
use super::*;
1414
use anchor_lang::system_program::{transfer, Transfer};
15+
use ephemeral_rollups_sdk::types::DelegateAccountArgs;
1516

1617
pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
1718
let counter = &mut ctx.accounts.counter;
@@ -36,7 +37,10 @@ pub mod test_delegation {
3637
ctx.accounts.delegate_pda(
3738
&ctx.accounts.payer,
3839
&[TEST_PDA_SEED],
39-
DelegateConfig::default(),
40+
DelegateConfig {
41+
commit_frequency_ms: DelegateAccountArgs::default().commit_frequency_ms,
42+
validator: Some(pubkey!("tEsT3eV6RFCWs1BZ7AXTzasHqTtMnMLCB2tjQ42TDXD")),
43+
},
4044
)?;
4145
Ok(())
4246
}
@@ -46,12 +50,18 @@ pub mod test_delegation {
4650
ctx.accounts.delegate_pda(
4751
&ctx.accounts.payer,
4852
&[TEST_PDA_SEED],
49-
DelegateConfig::default(),
53+
DelegateConfig {
54+
commit_frequency_ms: DelegateAccountArgs::default().commit_frequency_ms,
55+
validator: Some(pubkey!("tEsT3eV6RFCWs1BZ7AXTzasHqTtMnMLCB2tjQ42TDXD")),
56+
},
5057
)?;
5158
ctx.accounts.delegate_pda_other(
5259
&ctx.accounts.payer,
5360
&[TEST_PDA_SEED_OTHER],
54-
DelegateConfig::default(),
61+
DelegateConfig {
62+
commit_frequency_ms: DelegateAccountArgs::default().commit_frequency_ms,
63+
validator: Some(pubkey!("tEsT3eV6RFCWs1BZ7AXTzasHqTtMnMLCB2tjQ42TDXD")),
64+
},
5565
)?;
5666
msg!(
5767
"Delegated {:?}, owner {:?}",

0 commit comments

Comments
 (0)