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

test: Cli: add mempool tests #8162

Merged
merged 7 commits into from
Feb 25, 2022
Merged

test: Cli: add mempool tests #8162

merged 7 commits into from
Feb 25, 2022

Conversation

brdji
Copy link
Contributor

@brdji brdji commented Feb 21, 2022

Related Issues

Mempool cli commands do not have any test coverage. This PR adds basic tests covering (almost) every cli command available for the mempool system.

Proposed Changes

Add a test for every mempool cli command.
Most of the tests perform simple "sanity" checks to see whether the cli command has been performed successfully. Even though they don't check for anything really substantial, having even basic tests around is invaluable whenever a new cli change is introduced.

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #8162 (a54d2fd) into master (5d416de) will increase coverage by 0.23%.
The diff coverage is 56.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8162      +/-   ##
==========================================
+ Coverage   39.91%   40.15%   +0.23%     
==========================================
  Files         666      666              
  Lines       72554    72561       +7     
==========================================
+ Hits        28963    29135     +172     
+ Misses      38553    38321     -232     
- Partials     5038     5105      +67     
Impacted Files Coverage Δ
cli/mpool.go 58.82% <56.66%> (+58.82%) ⬆️
markets/loggers/loggers.go 88.88% <0.00%> (-11.12%) ⬇️
chain/actors/builtin/miner/diff.go 48.52% <0.00%> (-10.30%) ⬇️
cli/util.go 70.83% <0.00%> (-8.34%) ⬇️
chain/exchange/peer_tracker.go 66.66% <0.00%> (-4.31%) ⬇️
storage/wdpost_sched.go 77.45% <0.00%> (-3.93%) ⬇️
chain/exchange/client.go 49.15% <0.00%> (-3.82%) ⬇️
chain/stmgr/call.go 67.87% <0.00%> (-3.64%) ⬇️
chain/vm/vm.go 61.63% <0.00%> (-1.07%) ⬇️
extern/storage-sealing/fsm.go 56.44% <0.00%> (-1.05%) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d416de...a54d2fd. Read the comment docs.

@brdji brdji marked this pull request as ready for review February 22, 2022 16:37
@brdji brdji requested a review from a team as a code owner February 22, 2022 16:37
@brdji brdji changed the title Cli mempool tests test: Cli: add mempool tests Feb 22, 2022
@magik6k magik6k merged commit 69470db into master Feb 25, 2022
@magik6k magik6k deleted the cli-mempool-tests branch February 25, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants