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

rpc-probe fixes and kvstore-fixtures and tests #758

Merged
merged 7 commits into from
Dec 22, 2020

Conversation

greg-szabo
Copy link
Member

@greg-szabo greg-szabo commented Dec 21, 2020

Closes #756 .
Part of #723 .

  • Important: all the JSON files in the change are auto-generated by rpc-probe. Do not review them in detail. (Here's a link where json files are filtered out.)

  • Moved the rpc-probe folder into tools/rpc-probe.

  • Removed the run-with-docker.sh script and implemented docker management using cargo-make in tools/rpc-probe/Makefile.toml.

  • Changed rpc-probe to dump its results into rpc/tests/kvstore_fixtures by default.

  • Implemented rpc/tests/kvstore_fixtures.rs tests that parse the rpc-probe results into Tendermint structs and make assertions against them.

  • rpc-probe now generates requests with null input instead of {} where there is no parameter for the request. (Deserialization is implemented for nulls.)

  • abci::transaction:Hash now has the PartialEq derive for easier testing.

  • AbciQuery::prove now has default serialization. (That was a small bug.)

  • Referenced an issue explaining the need for the change

  • Updated all relevant documentation in docs

  • Updated all code comments where relevant

  • Wrote tests

  • Updated CHANGELOG.md

@greg-szabo greg-szabo changed the title rpc-probe kvstore-fixtures rpc-probe fixes and kvstore-fixtures and tests Dec 21, 2020
@codecov-io
Copy link

Codecov Report

Merging #758 (145b245) into master (8bbb09b) will increase coverage by 5.7%.
The diff coverage is 99.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #758     +/-   ##
========================================
+ Coverage    43.1%   48.8%   +5.7%     
========================================
  Files         204     197      -7     
  Lines       13620   13080    -540     
  Branches     3571    3226    -345     
========================================
+ Hits         5874    6391    +517     
+ Misses       7369    6323   -1046     
+ Partials      377     366     -11     
Impacted Files Coverage Δ
rpc/src/endpoint/abci_query.rs 28.5% <ø> (ø)
tendermint/src/abci/transaction/hash.rs 47.5% <0.0%> (+6.4%) ⬆️
tools/rpc-probe/src/subscription.rs 0.0% <ø> (ø)
rpc/tests/kvstore-fixtures.rs 99.2% <99.2%> (ø)
tendermint/src/channel.rs 21.3% <0.0%> (-8.1%) ⬇️
rpc/src/endpoint/block.rs 30.7% <0.0%> (ø)
tendermint/src/public_key.rs 54.1% <0.0%> (ø)
rpc/src/endpoint/block_results.rs 0.0% <0.0%> (ø)
rpc/src/endpoint/broadcast/tx_sync.rs 0.0% <0.0%> (ø)
... and 16 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 8bbb09b...145b245. Read the comment docs.

Copy link
Member

@thanethomson thanethomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall!

tools/rpc-probe/src/main.rs Outdated Show resolved Hide resolved
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson merged commit bb6c5d6 into master Dec 22, 2020
@thanethomson thanethomson deleted the greg/rpc-probe-fixes branch December 22, 2020 14:49
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.

Make rpc-probe a first-class testing tool
3 participants