Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutation Tests stackslib/src/chainstate/stacks/boot/mod.rs > handle_pox_cycle_start_pox_2 #4854

Open
9 tasks
ASuciuX opened this issue Jun 4, 2024 · 0 comments

Comments

@ASuciuX
Copy link
Contributor

ASuciuX commented Jun 4, 2024

Related #4587

The mutation testing highlighted there might be missing unit tests for handle_pox_cycle_start_pox_2 but there needs to be created a default for StacksTransactionEvent to check it.

The steps for making sure the handle_pox_cycle_start_pox_2 function has its possible outcomes caught are:

  • create default for StacksTransactionEvent
  • 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::handle_pox_cycle_start_pox_2" -E ": replace .{1,2} with .{1,2} in " --baseline=skip --test-tool=nextest -- --run-ignored all --no-fail-fast --test-threads 1
    
    • Ok(vec![Default::default()])
  • create tests if they aren't caught

Same flow for:

  • handle_pox_cycle_start_pox_3
  • handle_pox_cycle_start_pox_4
  • handle_pox_cycle_missed_unlocks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

1 participant