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
c1662615
Commit
c1662615
authored
Jun 19, 2015
by
Karthic Rao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more test cases for the test struct
parent
84998a4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
config/setup/log_test.go
config/setup/log_test.go
+35
-0
No files found.
config/setup/log_test.go
View file @
c1662615
...
@@ -63,6 +63,41 @@ func TestLogParse(t *testing.T) {
...
@@ -63,6 +63,41 @@ func TestLogParse(t *testing.T) {
OutputFile
:
"log.txt"
,
OutputFile
:
"log.txt"
,
Format
:
caddylog
.
DefaultLogFormat
,
Format
:
caddylog
.
DefaultLogFormat
,
}}},
}}},
{
`log /serve stdout`
,
false
,
[]
caddylog
.
Rule
{{
PathScope
:
"/serve"
,
OutputFile
:
"stdout"
,
Format
:
caddylog
.
DefaultLogFormat
,
}}},
{
`log /myapi log.txt {common}`
,
false
,
[]
caddylog
.
Rule
{{
PathScope
:
"/myapi"
,
OutputFile
:
"log.txt"
,
Format
:
caddylog
.
CommonLogFormat
,
}}},
{
`log /test accesslog.txt {combined}`
,
false
,
[]
caddylog
.
Rule
{{
PathScope
:
"/test"
,
OutputFile
:
"accesslog.txt"
,
Format
:
caddylog
.
CombinedLogFormat
,
}}},
{
`log /api1 log.txt
log /api2 accesslog.txt {combined}`
,
false
,
[]
caddylog
.
Rule
{{
PathScope
:
"/api1"
,
OutputFile
:
"log.txt"
,
Format
:
caddylog
.
DefaultLogFormat
,
},
{
PathScope
:
"/api2"
,
OutputFile
:
"accesslog.txt"
,
Format
:
caddylog
.
CombinedLogFormat
,
}}},
{
`log /api3 stdout {host}
log /api4 log.txt {when}`
,
false
,
[]
caddylog
.
Rule
{{
PathScope
:
"/api3"
,
OutputFile
:
"stdout"
,
Format
:
"{host}"
,
},
{
PathScope
:
"/api4"
,
OutputFile
:
"log.txt"
,
Format
:
"{when}"
,
}}},
}
}
for
i
,
test
:=
range
tests
{
for
i
,
test
:=
range
tests
{
c
:=
newTestController
(
test
.
inputLogRules
)
c
:=
newTestController
(
test
.
inputLogRules
)
...
...
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