-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix: fix to prevent external filesystem dependency of simulations #695
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #695 +/- ##
==========================================
- Coverage 62.01% 61.97% -0.05%
==========================================
Files 874 877 +3
Lines 98614 98764 +150
==========================================
+ Hits 61156 61206 +50
- Misses 33841 33938 +97
- Partials 3617 3620 +3
|
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.
Please add changelog about this PR to CHANGELOG.md
file
And could you add unittest about this changes.
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.
Please change the title more detail.
I couldn't understand and guess what is change.
x/wasm/simulation/operations.go
Outdated
if err != nil { | ||
panic(err) |
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.
How about adding the unittest of this lines?
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.
This is dead code, so I deleted it.
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.
Please check conflict
Description
Fixed to prevent external filesystem dependency of simulation.
The code has been modified as follows.
WeightedOperations returns a function, so I added a test to compare types.
Motivation and context
Because if the path is not resolved correctly or the file is not found, the call may fail and execution may panic.
How has this been tested?
Checklist:
CHANGELOG.md
client/docs/swagger-ui/swagger.yaml