Skip to content

Commit

Permalink
Tweak tests as a bonus after required rebase...
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Apr 17, 2020
1 parent d59fcb7 commit 7954f36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use solana_ledger::{
};
use solana_runtime::{append_vec::AppendVec, bank::Bank};
use solana_sdk::{
account::Account, clock::Slot, genesis_config::GenesisConfig, native_token::lamports_to_sol, pubkey::Pubkey,
shred_version::compute_shred_version,
account::Account, clock::Slot, genesis_config::GenesisConfig, native_token::lamports_to_sol,
pubkey::Pubkey, shred_version::compute_shred_version,
};
use solana_vote_program::vote_state::VoteState;
use std::{
Expand Down
11 changes: 9 additions & 2 deletions runtime/src/append_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,13 @@ pub mod tests {
let _av = AppendVec::new(&path.path, true, 0);
}

#[test]
#[should_panic(expected = "Unable to open data path")]
fn test_append_vec_new_not_existing() {
let path = get_append_vec_path("test_append_vec_new_not_existing");
let _av = AppendVec::new(&path.path, false, 1);
}

#[test]
fn test_append_vec_set_file_bad_size() {
let file = get_append_vec_path("test_append_vec_set_file_bad_size");
Expand All @@ -616,7 +623,7 @@ pub mod tests {
}

#[test]
fn test_append_vec_new_empty_tmp_rw() {
fn test_append_vec_new_empty_map_rw() {
let file = get_append_vec_path("test_append_vec_new_empty_map_rw");
let path = &file.path;

Expand All @@ -630,7 +637,7 @@ pub mod tests {
}

#[test]
fn test_append_vec_new_empty_tmp_ro() {
fn test_append_vec_new_empty_map_ro() {
let file = get_append_vec_path("test_append_vec_new_empty_map_ro");
let path = &file.path;

Expand Down

0 comments on commit 7954f36

Please sign in to comment.