Skip to content

Commit

Permalink
Adjusts tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Jul 31, 2024
1 parent 09ee067 commit 71d4ba8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
5 changes: 1 addition & 4 deletions programs/sbf/tests/programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1210,10 +1210,7 @@ fn test_program_sbf_caller_has_access_to_cpi_program() {
];
let instruction = Instruction::new_with_bytes(caller_pubkey, &[1], account_metas.clone());
let result = bank_client.send_and_confirm_instruction(&mint_keypair, instruction);
assert_eq!(
result.unwrap_err().unwrap(),
TransactionError::InstructionError(0, InstructionError::MissingAccount)
);
assert!(result.is_ok());
}

#[test]
Expand Down
16 changes: 6 additions & 10 deletions runtime/src/bank/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7658,16 +7658,12 @@ fn test_bpf_loader_upgradeable_deploy_with_max_len() {
.get_mut(6)
.unwrap() = AccountMeta::new_readonly(Pubkey::new_unique(), false);
let message = Message::new(&instructions, Some(&mint_keypair.pubkey()));
assert_eq!(
TransactionError::InstructionError(1, InstructionError::MissingAccount),
bank_client
.send_and_confirm_message(
&[&mint_keypair, &program_keypair, &upgrade_authority_keypair],
message
)
.unwrap_err()
.unwrap()
);
assert!(bank_client
.send_and_confirm_message(
&[&mint_keypair, &program_keypair, &upgrade_authority_keypair],
message
)
.is_ok());

fn truncate_data(account: &mut AccountSharedData, len: usize) {
let mut data = account.data().to_vec();
Expand Down

0 comments on commit 71d4ba8

Please sign in to comment.