Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr
Commits
a051a05e
Unverified
Commit
a051a05e
authored
Feb 25, 2021
by
Will
Committed by
GitHub
Feb 25, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #136 from marten-seemann/dont-listen-on-all-interfaces
don't listen on all interfaces in tests, unless on CI
parents
7274874c
8c84127a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
net/net_test.go
net/net_test.go
+22
-17
No files found.
net/net_test.go
View file @
a051a05e
...
...
@@ -232,23 +232,28 @@ func TestListenAddrs(t *testing.T) {
test
(
"/ip4/127.0.0.1/tcp/4324"
,
""
,
true
)
test
(
"/ip4/127.0.0.1/udp/4325"
,
""
,
false
)
test
(
"/ip4/127.0.0.1/udp/4326/udt"
,
""
,
false
)
test
(
"/ip4/0.0.0.0/tcp/4324"
,
""
,
true
)
test
(
"/ip4/0.0.0.0/udp/4325"
,
""
,
false
)
test
(
"/ip4/0.0.0.0/udp/4326/udt"
,
""
,
false
)
test
(
"/ip6/::1/tcp/4324"
,
""
,
true
)
test
(
"/ip6/::1/udp/4325"
,
""
,
false
)
test
(
"/ip6/::1/udp/4326/udt"
,
""
,
false
)
test
(
"/ip6/::/tcp/4324"
,
""
,
true
)
test
(
"/ip6/::/udp/4325"
,
""
,
false
)
test
(
"/ip6/::/udp/4326/udt"
,
""
,
false
)
/* "An implementation should also support the concept of a "default"
* zone for each scope. And, when supported, the index value zero
* at each scope SHOULD be reserved to mean "use the default zone"."
* -- rfc4007. So, this _should_ work everywhere(?). */
test
(
"/ip6zone/0/ip6/::1/tcp/4324"
,
"/ip6/::1/tcp/4324"
,
true
)
test
(
"/ip6zone/0/ip6/::1/udp/4324"
,
""
,
false
)
if
len
(
os
.
Getenv
(
"CI"
))
>
0
{
test
(
"/ip4/0.0.0.0/tcp/4324"
,
""
,
true
)
test
(
"/ip4/0.0.0.0/udp/4325"
,
""
,
false
)
test
(
"/ip4/0.0.0.0/udp/4326/udt"
,
""
,
false
)
test
(
"/ip6/::1/tcp/4324"
,
""
,
true
)
test
(
"/ip6/::1/udp/4325"
,
""
,
false
)
test
(
"/ip6/::1/udp/4326/udt"
,
""
,
false
)
test
(
"/ip6/::/tcp/4324"
,
""
,
true
)
test
(
"/ip6/::/udp/4325"
,
""
,
false
)
test
(
"/ip6/::/udp/4326/udt"
,
""
,
false
)
/* "An implementation should also support the concept of a "default"
* zone for each scope. And, when supported, the index value zero
* at each scope SHOULD be reserved to mean "use the default zone"."
* -- rfc4007. So, this _should_ work everywhere(?). */
test
(
"/ip6zone/0/ip6/::1/tcp/4324"
,
"/ip6/::1/tcp/4324"
,
true
)
test
(
"/ip6zone/0/ip6/::1/udp/4324"
,
""
,
false
)
}
else
{
t
.
Skip
(
"all tests only run on CI"
)
}
}
func
TestListenAndDial
(
t
*
testing
.
T
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment