-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
add max_entry_size to sanitized config output #20044
Conversation
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.
Looks good to me!
defer ln.Close() | ||
TestServerAuth(t, addr, token) | ||
for _, tc := range cases { | ||
tc := tc |
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.
nit: should this be removed?
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 believe this is a common pattern to capture the loop variable inside a closure (see: #16872 for an example).
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.
Thanks for calling that out. I meant to add t.Parallel
to these which is why the capturing is present. I'll add parallelism.
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.
See cc23ded
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.
Looks good to me! Just one comment about another test-case. Feel free to ignore.
defer ln.Close() | ||
TestServerAuth(t, addr, token) | ||
for _, tc := range cases { | ||
tc := tc |
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 believe this is a common pattern to capture the loop variable inside a closure (see: #16872 for an example).
http/sys_config_state_test.go
Outdated
expectedHAStorageOutput map[string]interface{} | ||
}{ | ||
{ | ||
"raft storage", |
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.
nit: these test cases would be a bit more readable if we used named struct fields, e.g.
{
name: "raft storage",
storageConfig: &server.Storage{...},
...
}
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.
Good point, I'll change that. GoLand has a UI treatment to identify which fields are which but that doesn't help those using a different IDE, or reading it in GitHub. Thanks for the feedback!
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.
See ca39491
* add max_entry_size to sanitized config output * add changelog entry * add test parallelism * add inmem test case * use named struct fields for TestSysConfigState_Sanitized cases
* add max_entry_size to sanitized config output * add changelog entry * add test parallelism * add inmem test case * use named struct fields for TestSysConfigState_Sanitized cases
This PR adds a
raft
sub-field to the sanitized config storage and HA storage details in order to expose Raft's max_entry_size.