-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 required tests for go/netutil
#15392
Conversation
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
I don't think it would be helpful to add test for |
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 with the one assertion change
if got := JoinHostPort(input.host, input.port); got != want { | ||
t.Errorf("SplitHostPort(%v, %v) = %#v, want %#v", input.host, input.port, got, want) | ||
} | ||
assert.Equal(t, want, JoinHostPort(input.host, input.port)) |
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.
outside the scope of this PR, but should we delete this function in favor of the stdlib net.JoinHostPort
? cc @mattlord, the signature is slightly different (we take an int32
port whereas stdlib takes string
)
Signed-off-by: Noble Mittal <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15392 +/- ##
==========================================
- Coverage 67.41% 65.46% -1.96%
==========================================
Files 1560 1562 +2
Lines 192752 193925 +1173
==========================================
- Hits 129952 126959 -2993
- Misses 62800 66966 +4166 ☔ View full report in Codecov by Sentry. |
Description
Adds required tests for
go/netutil
Related Issue(s)
Checklist
Deployment Notes