program-test now adds SPL Token automatically

This commit is contained in:
Michael Vines 2020-11-25 11:26:08 -08:00 committed by mergify[bot]
parent 6aa1d8cce1
commit a477895f02
3 changed files with 4 additions and 29 deletions

View File

@ -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:

View File

@ -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

View File

@ -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(