Skip to content

Commit

Permalink
Minor cleanup on some snapshot related tests (solana-labs#33485)
Browse files Browse the repository at this point in the history
  • Loading branch information
steviez authored Oct 2, 2023
1 parent 73e9e6d commit 3eae980
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/snapshot_packager_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ mod tests {
let bank_snapshot_info =
snapshot_utils::get_highest_bank_snapshot(&bank_snapshots_dir).unwrap();
let snapshot_storages = bank.get_snapshot_storages(None);
let archive_format = ArchiveFormat::TarBzip2;
let archive_format = ArchiveFormat::Tar;

let full_archive = snapshot_bank_utils::package_and_archive_full_snapshot(
&bank,
Expand Down
2 changes: 1 addition & 1 deletion download-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ pub fn download_snapshot_archive(
ArchiveFormat::TarGzip,
ArchiveFormat::TarBzip2,
ArchiveFormat::TarLz4,
ArchiveFormat::Tar, // `solana-test-validator` creates uncompressed snapshots
ArchiveFormat::Tar,
] {
let destination_path = match snapshot_kind {
SnapshotKind::FullSnapshot => snapshot_utils::build_full_snapshot_archive_path(
Expand Down
4 changes: 3 additions & 1 deletion rpc/src/rpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,9 @@ mod tests {
assert!(!rrm.is_file_get_path("//genesis.tar.bz2"));
assert!(!rrm.is_file_get_path("/../genesis.tar.bz2"));

assert!(!rrm.is_file_get_path("/snapshot.tar.bz2")); // This is a redirect
// These two are redirects
assert!(!rrm.is_file_get_path("/snapshot.tar.bz2"));
assert!(!rrm.is_file_get_path("/incremental-snapshot.tar.bz2"));

assert!(!rrm.is_file_get_path(
"/snapshot-100-AvFf9oS8A8U78HdjT9YG2sTTThLHJZmhaMn2g8vkWYnr.tar.bz2"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank/serde_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ mod tests {
None,
full_snapshot_archives_dir.path(),
incremental_snapshot_archives_dir.path(),
ArchiveFormat::TarBzip2,
ArchiveFormat::Tar,
NonZeroUsize::new(1).unwrap(),
NonZeroUsize::new(1).unwrap(),
)
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/snapshot_bank_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ mod tests {
let bank_snapshots_dir = tempfile::TempDir::new().unwrap();
let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let snapshot_archive_format = ArchiveFormat::TarGzip;
let snapshot_archive_format = ArchiveFormat::Tar;

let full_snapshot_archive_info = bank_to_full_snapshot_archive(
bank_snapshots_dir.path(),
Expand Down

0 comments on commit 3eae980

Please sign in to comment.