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
4db54f8d
Commit
4db54f8d
authored
Oct 20, 2015
by
Matt Holt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #281 from mem/master
Add TestNewDefault to config tests
parents
159eb68a
8f9f6caa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
config/config_test.go
config/config_test.go
+14
-0
No files found.
config/config_test.go
View file @
4db54f8d
...
...
@@ -8,6 +8,20 @@ import (
"github.com/mholt/caddy/server"
)
func
TestNewDefault
(
t
*
testing
.
T
)
{
config
:=
NewDefault
()
if
actual
,
expected
:=
config
.
Root
,
DefaultRoot
;
actual
!=
expected
{
t
.
Errorf
(
"Root was %s but expected %s"
,
actual
,
expected
)
}
if
actual
,
expected
:=
config
.
Host
,
DefaultHost
;
actual
!=
expected
{
t
.
Errorf
(
"Host was %s but expected %s"
,
actual
,
expected
)
}
if
actual
,
expected
:=
config
.
Port
,
DefaultPort
;
actual
!=
expected
{
t
.
Errorf
(
"Port was %s but expected %s"
,
actual
,
expected
)
}
}
func
TestResolveAddr
(
t
*
testing
.
T
)
{
// NOTE: If tests fail due to comparing to string "127.0.0.1",
// it's possible that system env resolves with IPv6, or ::1.
...
...
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