Skip to content

Commit

Permalink
zcash_client_sqlite: Move tests that require fixes to the test framew…
Browse files Browse the repository at this point in the history
…ork behind the `orchard` flag.
  • Loading branch information
nuttycom committed Mar 12, 2024
1 parent aa4dea2 commit ae3f56d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
4 changes: 3 additions & 1 deletion zcash_client_sqlite/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,16 @@ mod tests {
testing::pool::valid_chain_states::<OrchardPoolTester>()
}

// FIXME: This requires test framework fixes to pass.
#[test]
#[cfg(feature = "orchard")]
fn invalid_chain_cache_disconnected_sapling() {
testing::pool::invalid_chain_cache_disconnected::<SaplingPoolTester>()
}

#[test]
#[cfg(feature = "orchard")]
fn invalid_chain_cache_disconnected_orchard() {
#[cfg(feature = "orchard")]
testing::pool::invalid_chain_cache_disconnected::<OrchardPoolTester>()
}

Expand Down
4 changes: 4 additions & 0 deletions zcash_client_sqlite/src/testing/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,8 @@ pub(crate) fn shield_transparent<T: ShieldedPoolTester>() {
);
}

// FIXME: This requires fixes to the test framework.
#[allow(dead_code)]
pub(crate) fn birthday_in_anchor_shard<T: ShieldedPoolTester>() {
// Use a non-zero birthday offset because Sapling and NU5 are activated at the same height.
let (mut st, dfvk, birthday, _) = test_with_nu5_birthday_offset::<T>(76);
Expand Down Expand Up @@ -1519,6 +1521,8 @@ pub(crate) fn valid_chain_states<T: ShieldedPoolTester>() {
st.scan_cached_blocks(h2, 1);
}

// FIXME: This requires fixes to the test framework.
#[allow(dead_code)]
pub(crate) fn invalid_chain_cache_disconnected<T: ShieldedPoolTester>() {
let mut st = TestBuilder::new()
.with_block_cache()
Expand Down
2 changes: 2 additions & 0 deletions zcash_client_sqlite/src/wallet/sapling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,9 @@ pub(crate) mod tests {
testing::pool::shield_transparent::<SaplingPoolTester>()
}

// FIXME: This requires fixes to the test framework.
#[test]
#[cfg(feature = "orchard")]
fn birthday_in_anchor_shard() {
testing::pool::birthday_in_anchor_shard::<SaplingPoolTester>()
}
Expand Down
14 changes: 12 additions & 2 deletions zcash_client_sqlite/src/wallet/scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,17 +611,21 @@ pub(crate) mod tests {
zcash_client_backend::data_api::ORCHARD_SHARD_HEIGHT,
};

// FIXME: This requires fixes to the test framework.
#[test]
#[cfg(feature = "orchard")]
fn sapling_scan_complete() {
scan_complete::<SaplingPoolTester>();
}

#[cfg(feature = "orchard")]
#[test]
#[cfg(feature = "orchard")]
fn orchard_scan_complete() {
scan_complete::<OrchardPoolTester>();
}

// FIXME: This requires fixes to the test framework.
#[allow(dead_code)]
fn scan_complete<T: ShieldedPoolTester>() {
use ScanPriority::*;

Expand Down Expand Up @@ -963,7 +967,9 @@ pub(crate) mod tests {
assert_eq!(actual, expected);
}

// FIXME: This requires fixes to the test framework.
#[test]
#[cfg(feature = "orchard")]
fn sapling_update_chain_tip_unstable_max_scanned() {
update_chain_tip_unstable_max_scanned::<SaplingPoolTester>();
}
Expand All @@ -974,6 +980,8 @@ pub(crate) mod tests {
update_chain_tip_unstable_max_scanned::<OrchardPoolTester>();
}

// FIXME: This requires fixes to the test framework.
#[allow(dead_code)]
fn update_chain_tip_unstable_max_scanned<T: ShieldedPoolTester>() {
use ScanPriority::*;

Expand Down Expand Up @@ -1102,13 +1110,15 @@ pub(crate) mod tests {
assert_eq!(actual, expected);
}

// FIXME: This requires fixes to the test framework.
#[test]
#[cfg(feature = "orchard")]
fn sapling_update_chain_tip_stable_max_scanned() {
update_chain_tip_stable_max_scanned::<SaplingPoolTester>();
}

#[cfg(feature = "orchard")]
#[test]
#[cfg(feature = "orchard")]
fn orchard_update_chain_tip_stable_max_scanned() {
update_chain_tip_stable_max_scanned::<OrchardPoolTester>();
}
Expand Down

0 comments on commit ae3f56d

Please sign in to comment.