iroha icon indicating copy to clipboard operation
iroha copied to clipboard

[feature] #2712: Config proptests

Open ilchu opened this issue 2 years ago • 1 comments

Description of the Change

  • Added property testing to the Iroha and Iroha client ConfigurationProxy structs
  • Expanded default config.json to allow them to be built from proxies immediately upon reading
  • Updates some docs, error messages, trait derives

Issue

Closes #2712.

Benefits

More confidence in current proxy implementation's robustness.

Possible Drawbacks

I've struggled a bit with a generation strategy that would be compact yet showing the intended invariant, so I hope nothing's missing.

Usage Examples or Tests

cargo test --package iroha_config --lib -- iroha::tests client::tests --nocapture

Alternate Designs [optional]

ilchu avatar Sep 21 '22 12:09 ilchu

Codecov Report

Merging #2770 (c4cd158) into iroha2-dev (a16d9c3) will decrease coverage by 1.52%. The diff coverage is 73.36%.

:exclamation: Current head c4cd158 differs from pull request most recent head 1159a61. Consider uploading reports for the commit 1159a61 to get more accurate results

@@              Coverage Diff               @@
##           iroha2-dev    #2770      +/-   ##
==============================================
- Coverage       67.61%   66.09%   -1.53%     
==============================================
  Files             140      166      +26     
  Lines           26173    30222    +4049     
==============================================
+ Hits            17696    19974    +2278     
- Misses           8477    10248    +1771     
Impacted Files Coverage Δ
actor/src/actor_id.rs 90.00% <ø> (ø)
actor/src/deadlock.rs 100.00% <ø> (ø)
cli/derive/src/lib.rs 92.30% <ø> (+17.58%) :arrow_up:
cli/src/event.rs 41.86% <ø> (ø)
cli/src/main.rs 1.09% <0.00%> (-0.26%) :arrow_down:
cli/src/stream.rs 81.39% <ø> (ø)
cli/src/torii/mod.rs 28.88% <0.00%> (ø)
client/src/http.rs 47.82% <ø> (ø)
client/src/http_default.rs 41.59% <ø> (-18.59%) :arrow_down:
client_cli/src/main.rs 0.27% <0.00%> (+0.01%) :arrow_up:
... and 212 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 21 '22 12:09 codecov[bot]

@Erigara @ilchu Just a vocabulary note. The word finalize has the -ize ending, the spelling of which cannot be agreed upon. If we write ise we'll annoy all American contributors, while writing -ize annoys British English speakers.

Can we come up with a different word? For example: finish, commit, complete, hell even consummate?

appetrosyan avatar Sep 29 '22 06:09 appetrosyan