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: Add probe to capture responses from Tendermint RPC for use in testing #653

Merged
merged 19 commits into from
Nov 18, 2020

Conversation

thanethomson
Copy link
Contributor

@thanethomson thanethomson commented Oct 23, 2020

Closes #611 and #612.

I'm adding a small RPC probe application here that specifically does not rely on the tendermint-rpc crate and allows for maximal flexibility in JSON-RPC response structure. The idea here is to be able to execute a bunch of queries/subscriptions against a running Tendermint node and capture the responses (and possibly the requests, if needed).

These responses we can then add into our text fixtures for local "integration" testing.

The probe doesn't depend on any other crates in the repo - this is by design, since its purpose is to capture responses potentially outside the purview of our serialization infrastructure.

📖 Rendered README

  • 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

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson changed the title Add WIP rpc probe with quick probe functionality rpc: Add probe to capture responses from Tendermint RPC for use in testing Oct 23, 2020
@codecov-io
Copy link

codecov-io commented Oct 23, 2020

Codecov Report

Merging #653 (54cde9f) into master (0ad5f50) will decrease coverage by 0.3%.
The diff coverage is 0.1%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #653     +/-   ##
========================================
- Coverage    39.5%   39.1%   -0.4%     
========================================
  Files         183     191      +8     
  Lines       12871   12550    -321     
  Branches     2943    3234    +291     
========================================
- Hits         5095    4918    -177     
+ Misses       7528    7387    -141     
+ Partials      248     245      -3     
Impacted Files Coverage Δ
rpc-probe/src/client.rs 0.0% <0.0%> (ø)
rpc-probe/src/error.rs 0.0% <0.0%> (ø)
rpc-probe/src/kvstore.rs 0.0% <0.0%> (ø)
rpc-probe/src/plan.rs 0.0% <0.0%> (ø)
rpc-probe/src/quick.rs 0.0% <0.0%> (ø)
rpc-probe/src/request.rs 0.0% <0.0%> (ø)
rpc-probe/src/subscription.rs 0.0% <0.0%> (ø)
rpc-probe/src/utils.rs 0.0% <0.0%> (ø)
rpc-probe/src/main.rs 4.5% <4.5%> (ø)
light-client/src/errors.rs 2.3% <0.0%> (-5.6%) ⬇️
... and 14 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 0ad5f50...54cde9f. Read the comment docs.

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson marked this pull request as ready for review November 10, 2020 17:20
Signed-off-by: Thane Thomson <connect@thanethomson.com>
thanethomson and others added 5 commits November 10, 2020 12:33
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Copy link
Member

@greg-szabo greg-szabo left a comment

Choose a reason for hiding this comment

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

In a follow up PR I would like to set the version number of the crate to the upcoming release and pin the Docker Hub image to the same version that the release is going to use.

@thanethomson
Copy link
Contributor Author

In a follow up PR I would like to set the version number of the crate to the upcoming release and pin the Docker Hub image to the same version that the release is going to use.

Cool, we could do that in a separate PR or just in the v0.17.0-rc3 release PR.

@thanethomson thanethomson merged commit fa415e3 into master Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rpc: Include more variations on fixtures for testing
3 participants