-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Fix failing tests on systems not supporting IPv6 #1725
Conversation
Build failure persists after revert merge in PR #1722. The acutall cause seems to be IPv6 testing due to added tests in PR #1667 .
|
@pafuent Please review and merge |
echo_test.go
Outdated
func TestEchoListenerNetwork(t *testing.T) { | ||
for _, tt := range listenerNetworkTests { | ||
if !supportsIPv6() && strings.Contains(tt.address, "::") { |
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.
Please store the value of supportsIPv6() in a variable before the for to avoid getting Interfaces information for every test
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.
nice catch!
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.
Oops. Fixing
8e114d8
to
3e5a3f4
Compare
3e5a3f4
to
e4fe8c8
Compare
Rebased on master. Fixed open issues. |
Master tests are green again! |
A very naive fix to allow running tests on non-IPv6 enabled systems.
Although Go implements
supportsIPv6
andsupportsIPv4
in thenet
package for it's own tests those functions are private and cannot be used outside.This will fix CI tests which run on non-IPv6 enabled systems (and those on my laptop).