-
Notifications
You must be signed in to change notification settings - Fork 278
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
Removal of arguments from test_network crate #1414
Conversation
115b716
to
70a83bd
Compare
Codecov Report
@@ Coverage Diff @@
## iroha2-dev #1414 +/- ##
==============================================
+ Coverage 75.35% 76.06% +0.70%
==============================================
Files 121 119 -2
Lines 17560 17503 -57
==============================================
+ Hits 13233 13313 +80
+ Misses 4327 4190 -137
Continue to review full report at Codecov.
|
Signed-off-by: i1i1 <[email protected]>
iroha/test_network/src/lib.rs
Outdated
G::from_configuration( | ||
submit_genesis, | ||
GENESIS_PATH, | ||
&cfg.genesis_configuration, | ||
cfg.sumeragi_configuration.max_instruction_number, | ||
) | ||
.expect("Failed to") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think as you mentioned - the purpose was not to load it from file in tests, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose was not to load to much files from path. I guess we can read files during compilation of crate. What are your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this way it reads file earlier, which is good if this helps with tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial thoughts were that you would supply genesis Instructions directly in the code. This might be useful for tests and I think our Java client team does this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont see a difference between these 2 things, apart from ide autocompletion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that we will not create json for each test that wants custom genesis is a big plus to my mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But anyway we can merge as is. It is just a possible improvement for the future.
Description of the Change
Removal of arguments from test_network crate
Issue
It is a failure point for us to have arguments in tests, as they force us to read from disk. Also that forces us to take with us 3 configs and put them everywhere in tests.
Benefits
Less errors due to disk failures. Easier genesis usage in tests.
Possible Drawbacks
Usage Examples or Tests [optional]
Alternate Designs [optional]