-
Notifications
You must be signed in to change notification settings - Fork 60
Extend box information with replication fields #427
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
Extend box information with replication fields #427
Conversation
0b8374e
to
a0325d8
Compare
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.
Thank you for the patch!
Please, add tests for the change (integration tests to the box/tarantool_test.go and a unit-tests of the message pack decoding in info_test.go).
a0325d8
to
5d91dde
Compare
@oleg-jukovec Thanks for the quick response.
Please tell me what you think needs to be tested in this test. |
You could encode a map as a MessagePack and decode it as InfoResponse. The pseudo-code: expected := InfoResponse{
Info: Info{
Foo: "bar",
},
}
data, err := msgpack.Marshal(map[string]any{
"foo": "bar",
})
require.NoError(err)
var result InfoResponse
err = msgpack.Unmarshal(data, &result)
require.NoError(err)
require.Equals(t, expected, result) In that way you could ensure that all fields decoded as expected and you don't make a mistake or misprint. It also would be a good starting point for tests in the future. You need to cover decoding of all new fields with the test. |
5d91dde
to
153fc25
Compare
@oleg-jukovec Thanks for your detailed answer. I add tests. Could you please take a look? |
153fc25
to
8d0d862
Compare
Add additional fields .message .system_message. |
e95cce5
to
1a78e05
Compare
Please, fix linter errors:
|
1a78e05
to
f0013af
Compare
@oleg-jukovec For some unknown reason local golangci-lint doesn't work. Fix all problems. |
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.
Thank you for the patch!
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 the patch, just some small nits.
f0013af
to
f3d9e7b
Compare
@DerekBum Thanks for you review. |
Thank you for the patch! |
What has been done? Why? What problem is being solved?
Extend box information with replication fields.
I didn't forget about (remove if it is not applicable):