Skip to content

Commit e5150b7

Browse files
authored
use proper program id in program tests (#9)
1 parent ad316b8 commit e5150b7

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

program/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,4 @@ pub mod instruction;
66
pub mod processor;
77
pub mod state;
88

9-
// [Core BPF]: TODO: Program-test will not overwrite existing built-ins.
10-
// See https://github.com/solana-labs/solana/pull/35233.
11-
// solana_program::declare_id!("Config1111111111111111111111111111111111111");
12-
solana_program::declare_id!("J333MuXPTwcHvibaTNMW32FZj6EHuowCnAHvvP99vnKv");
9+
solana_program::declare_id!("Config1111111111111111111111111111111111111");

program/tests/functional.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@ impl ConfigState for MyConfig {
4343

4444
async fn setup_test_context() -> ProgramTestContext {
4545
let mut program_test = ProgramTest::default();
46-
program_test.prefer_bpf(true);
47-
program_test.add_program(
48-
"solana_config_program",
49-
solana_config_program::id(),
50-
processor!(solana_config_program::processor::process),
51-
);
46+
program_test
47+
.add_upgradeable_program_to_genesis("solana_config_program", &solana_config_program::id());
5248
program_test.start_with_context().await
5349
}
5450

0 commit comments

Comments
 (0)