-
Notifications
You must be signed in to change notification settings - Fork 468
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
Test that parsing an empty CLI option set results in a default config #1661
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1661 +/- ##
===========================================
+ Coverage 28.38% 56.31% +27.93%
===========================================
Files 219 217 -2
Lines 32906 32603 -303
===========================================
+ Hits 9339 18361 +9022
+ Misses 22499 12028 -10471
- Partials 1068 2214 +1146 |
err = confighelpers.EndCommonParse(k, &emptyCliNodeConfig) | ||
Require(t, err) | ||
if !reflect.DeepEqual(emptyCliNodeConfig, NodeConfigDefault) { | ||
changelog, err := diff.Diff(emptyCliNodeConfig, NodeConfigDefault) |
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 think we use cmp.Diff
elsewhere, which could also replace the reflect.DeepEqual
call I think
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.
yeah actually initially i was using cmp.Diff only but i am running into this issue with it
cannot handle unexported field at {main.NodeConfig}.Node.BatchPoster.gasRefunder: "github.com/offchainlabs/nitro/arbnode".BatchPosterConfig consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported [recovered] panic: cannot handle unexported field at {main.NodeConfig}.Node.BatchPoster.gasRefunder: "github.com/offchainlabs/nitro/arbnode".BatchPosterConfig consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported
Wasn't sure how solve it in a generic manner so that it does not happen when add a new struct, hence moved to reflect.DeepEqual, let me know you have ideas on how to solve it. Thanks.
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.
lgtm
No description provided.