-
Notifications
You must be signed in to change notification settings - Fork 16
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
[CRE-42] Fix partial or truncated writes #989
[CRE-42] Fix partial or truncated writes #989
Conversation
@@ -553,29 +553,43 @@ func Test_read(t *testing.T) { | |||
} | |||
|
|||
func Test_write(t *testing.T) { | |||
t.Run("successfully write to slice", func(t *testing.T) { | |||
t.Run("OK-successfully_write_to_slice", func(t *testing.T) { |
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.
these OK/NOK are out of character with the rest of the code base; recommend removing them
and, there is no need to explicitly underscore the names; the go tooling does it under the hood
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.
removed 👍🏼
Description
This fix validates that the size specified matches the actual length of the data being written in order to avoid partial/truncated writes or unwanted data if the size is bigger than the actual data written. More info on the ticket
CRE-42
Requires
Supports