program-test now adds SPL Token automatically
This commit is contained in:
parent
6aa1d8cce1
commit
a477895f02
|
@ -16,13 +16,6 @@ fn program_test(token_mint_address: Pubkey) -> ProgramTest {
|
||||||
processor!(processor::process_instruction),
|
processor!(processor::process_instruction),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add SPL Token program
|
|
||||||
pc.add_program(
|
|
||||||
"spl_token",
|
|
||||||
spl_token::id(),
|
|
||||||
processor!(spl_token::processor::Processor::process),
|
|
||||||
);
|
|
||||||
|
|
||||||
// Add a token mint account
|
// Add a token mint account
|
||||||
//
|
//
|
||||||
// The account data was generated by running:
|
// The account data was generated by running:
|
||||||
|
|
|
@ -18,20 +18,11 @@ use spl_feature_proposal::{instruction::*, state::*, *};
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
fn program_test() -> ProgramTest {
|
fn program_test() -> ProgramTest {
|
||||||
let mut pc = ProgramTest::new(
|
ProgramTest::new(
|
||||||
"spl_feature_proposal",
|
"spl_feature_proposal",
|
||||||
id(),
|
id(),
|
||||||
processor!(processor::process_instruction),
|
processor!(processor::process_instruction),
|
||||||
);
|
)
|
||||||
|
|
||||||
// Add SPL Token program
|
|
||||||
pc.add_program(
|
|
||||||
"spl_token",
|
|
||||||
spl_token::id(),
|
|
||||||
processor!(spl_token::processor::Processor::process),
|
|
||||||
);
|
|
||||||
|
|
||||||
pc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fetch and unpack account data
|
/// Fetch and unpack account data
|
||||||
|
|
|
@ -13,20 +13,11 @@ use bincode::deserialize;
|
||||||
const TEST_STAKE_AMOUNT: u64 = 100;
|
const TEST_STAKE_AMOUNT: u64 = 100;
|
||||||
|
|
||||||
fn program_test() -> ProgramTest {
|
fn program_test() -> ProgramTest {
|
||||||
let mut pc = ProgramTest::new(
|
ProgramTest::new(
|
||||||
"spl_stake_pool",
|
"spl_stake_pool",
|
||||||
id(),
|
id(),
|
||||||
processor!(processor::Processor::process),
|
processor!(processor::Processor::process),
|
||||||
);
|
)
|
||||||
|
|
||||||
// Add SPL Token program
|
|
||||||
pc.add_program(
|
|
||||||
"spl_token",
|
|
||||||
spl_token::id(),
|
|
||||||
processor!(spl_token::processor::Processor::process),
|
|
||||||
);
|
|
||||||
|
|
||||||
pc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn create_mint(
|
async fn create_mint(
|
||||||
|
|
Loading…
Reference in New Issue