Skip to content

Fix WriteArg test #2832

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

Closed
wants to merge 2 commits into from
Closed

Fix WriteArg test #2832

wants to merge 2 commits into from

Conversation

ofekshenawa
Copy link
Collaborator

No description provided.

Comment on lines 164 to 171
for arg, expect := range args {
It(fmt.Sprintf("should write arg of type %T", arg), func() {
err := wr.WriteArg(arg)
Expect(err).NotTo(HaveOccurred())
Expect(buf.String()).To(Equal(expect))

})
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also important to pass arg and expect to the closure correctly. You can check #2808 for more details.

bool(false): "$1\r\n0\r\n",
util.ToPtr(bool(true)): "$1\r\n1\r\n",
util.ToPtr(bool(false)): "$1\r\n0\r\n",
"hello": "$1\r\nhello\r\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"hello": "$1\r\nhello\r\n",
"hello": "$5\r\nhello\r\n",

@ofekshenawa ofekshenawa deleted the os-fix-writearg-test branch December 17, 2023 15:45
@ofekshenawa
Copy link
Collaborator Author

Duplicate of #2808

@ofekshenawa ofekshenawa marked this as a duplicate of #2808 Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants