fixup! Add tests for blob pruning flags

This commit is contained in:
Emilia Hane 2023-02-10 16:18:39 +01:00
parent a1768b16b9
commit d9eed481b7
No known key found for this signature in database
GPG Key ID: E73394F9C09206FA

View File

@ -1357,27 +1357,27 @@ fn prune_blobs_on_startup_false() {
fn epochs_per_blob_prune_default() { fn epochs_per_blob_prune_default() {
CommandLineTest::new() CommandLineTest::new()
.run_with_zero_port() .run_with_zero_port()
.with_config(|config| assert!(config.epochs_per_blob_prune == 1)); .with_config(|config| assert!(config.store.epochs_per_blob_prune == 1));
} }
#[test] #[test]
fn epochs_per_blob_prune_on_startup_five() { fn epochs_per_blob_prune_on_startup_five() {
CommandLineTest::new() CommandLineTest::new()
.flag("epochs-per-blob-prune", Some(5)) .flag("epochs-per-blob-prune", Some("5"))
.run_with_zero_port() .run_with_zero_port()
.with_config(|config| assert!(!config.epochs_per_blob_prune == 5)); .with_config(|config| assert!(!config.store.epochs_per_blob_prune == 5));
} }
#[test] #[test]
fn blob_prune_margin_epochs_default() { fn blob_prune_margin_epochs_default() {
CommandLineTest::new() CommandLineTest::new()
.run_with_zero_port() .run_with_zero_port()
.with_config(|config| assert!(config.blob_prune_margin_epochs == 0)); .with_config(|config| assert!(config.store.blob_prune_margin_epochs == 0));
} }
#[test] #[test]
fn blob_prune_margin_epochs_on_startup_ten() { fn blob_prune_margin_epochs_on_startup_ten() {
CommandLineTest::new() CommandLineTest::new()
.flag("blob-prune-margin-epochs", Some(10)) .flag("blob-prune-margin-epochs", Some("10"))
.run_with_zero_port() .run_with_zero_port()
.with_config(|config| assert!(!config.blob_prune_margin_epochs == Some(10))); .with_config(|config| assert!(!config.store.blob_prune_margin_epochs == 10));
} }
#[test] #[test]
fn reconstruct_historic_states_flag() { fn reconstruct_historic_states_flag() {