Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
47d1f5ee
Commit
47d1f5ee
authored
Jun 23, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed tests that are not cross-platform compatible
parent
d8391d6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
config/config_test.go
config/config_test.go
+3
-2
No files found.
config/config_test.go
View file @
47d1f5ee
...
@@ -12,6 +12,9 @@ func TestReolveAddr(t *testing.T) {
...
@@ -12,6 +12,9 @@ func TestReolveAddr(t *testing.T) {
// If that happens, maybe we should use actualAddr.IP.IsLoopback()
// If that happens, maybe we should use actualAddr.IP.IsLoopback()
// for the assertion, rather than a direct string comparison.
// for the assertion, rather than a direct string comparison.
// NOTE: Tests with {Host: "", Port: ""} and {Host: "localhost", Port: ""}
// will not behave the same cross-platform, so they have bene omitted.
for
i
,
test
:=
range
[]
struct
{
for
i
,
test
:=
range
[]
struct
{
config
server
.
Config
config
server
.
Config
shouldWarnErr
bool
shouldWarnErr
bool
...
@@ -24,8 +27,6 @@ func TestReolveAddr(t *testing.T) {
...
@@ -24,8 +27,6 @@ func TestReolveAddr(t *testing.T) {
{
server
.
Config
{
Host
:
"should-not-resolve"
,
Port
:
"1234"
},
true
,
false
,
"0.0.0.0"
,
1234
},
{
server
.
Config
{
Host
:
"should-not-resolve"
,
Port
:
"1234"
},
true
,
false
,
"0.0.0.0"
,
1234
},
{
server
.
Config
{
Host
:
"localhost"
,
Port
:
"http"
},
false
,
false
,
"127.0.0.1"
,
80
},
{
server
.
Config
{
Host
:
"localhost"
,
Port
:
"http"
},
false
,
false
,
"127.0.0.1"
,
80
},
{
server
.
Config
{
Host
:
"localhost"
,
Port
:
"https"
},
false
,
false
,
"127.0.0.1"
,
443
},
{
server
.
Config
{
Host
:
"localhost"
,
Port
:
"https"
},
false
,
false
,
"127.0.0.1"
,
443
},
{
server
.
Config
{
Host
:
""
,
Port
:
""
},
false
,
true
,
""
,
0
},
{
server
.
Config
{
Host
:
"localhost"
,
Port
:
""
},
false
,
true
,
"127.0.0.1"
,
0
},
{
server
.
Config
{
Host
:
""
,
Port
:
"1234"
},
false
,
false
,
"<nil>"
,
1234
},
{
server
.
Config
{
Host
:
""
,
Port
:
"1234"
},
false
,
false
,
"<nil>"
,
1234
},
{
server
.
Config
{
Host
:
"localhost"
,
Port
:
"abcd"
},
false
,
true
,
""
,
0
},
{
server
.
Config
{
Host
:
"localhost"
,
Port
:
"abcd"
},
false
,
true
,
""
,
0
},
{
server
.
Config
{
BindHost
:
"127.0.0.1"
,
Host
:
"should-not-be-used"
,
Port
:
"1234"
},
false
,
false
,
"127.0.0.1"
,
1234
},
{
server
.
Config
{
BindHost
:
"127.0.0.1"
,
Host
:
"should-not-be-used"
,
Port
:
"1234"
},
false
,
false
,
"127.0.0.1"
,
1234
},
...
...
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