Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Add append-vec subcommand & another env knob #9490

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweak tests as a bonus after required rebase...
  • Loading branch information
ryoqun committed May 11, 2020
commit e152b748bad0bdb5410085af049e0c58dd23b42a
4 changes: 2 additions & 2 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,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