stacks-core
stacks-core copied to clipboard
Mutation Tests stackslib/src/chainstate/stacks/db/blocks.rs > process_next_staging_block
Related #4587
The mutation testing highlighted there might be missing unit tests for process_next_staging_block
but there needs to be created a default for StacksEpochReceipt
and TransactionPayload
to check it.
The steps for making sure the process_next_staging_block
function has its possible outcomes caught are:
-
[ ] create default for
StacksEpochReceipt
andTransactionPayload
-
[ ] remove the skip header
#[cfg_attr(test, mutants::skip)]
-
[ ] check if mutation tests are caught for these cases:
- [ ] run
RUST_BACKTRACE=1 BITCOIND_TEST=1 cargo mutants -vV -F "replace StacksChainState::process_next_staging_block" -E ": replace .{1,2} with .{1,2} in " --baseline=skip --test-tool=nextest -- --run-ignored all --no-fail-fast --test-threads 1
- [ ] Ok((None, Some(Default::default())))
- [ ] Ok((Some(Default::default()), None))
- [ ] Ok((Some(Default::default()), Some(Default::default())))
-
[ ] create tests if they aren't caught