Skip to content

Commit 71a02e8

Browse files
committed
TEST/MINOR: e2e: add loggers section tests
1 parent d69ee01 commit 71a02e8

13 files changed

Lines changed: 299 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "do-log",
3+
"loggers": ["applogs"]
4+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# _version=42
2+
3+
global
4+
log 127.0.0.1 local2
5+
chroot /var/lib/haproxy
6+
pidfile /var/run/haproxy.pid
7+
maxconn 4000
8+
user haproxy
9+
group haproxy
10+
stats socket /var/lib/haproxy/stats level admin
11+
12+
defaults mydefaults
13+
mode http
14+
log global
15+
option httplog
16+
option dontlognull
17+
option http-server-close
18+
option forwardfor except 127.0.0.0/8
19+
option redispatch
20+
retries 3
21+
timeout http-request 10s
22+
timeout queue 1m
23+
timeout connect 10s
24+
timeout client 1m
25+
timeout server 1m
26+
timeout http-keep-alive 10s
27+
timeout check 10s
28+
maxconn 3000
29+
30+
loggers applogs
31+
log 127.0.0.1:514 local0
32+
log 127.0.0.1:515 local1 notice
33+
34+
loggers audit
35+
log 127.0.0.1:516 local2
36+
37+
frontend test_frontend
38+
mode http
39+
bind 127.0.0.1:1234
40+
default_backend test_backend
41+
42+
backend test_backend
43+
mode http
44+
server s1 127.0.0.1:9000
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"address": "127.0.0.1:700",
3+
"facility": "local6"
4+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[
2+
{
3+
"address": "127.0.0.1:701",
4+
"facility": "local6"
5+
},
6+
{
7+
"address": "127.0.0.1:702",
8+
"facility": "local7",
9+
"level": "notice"
10+
},
11+
{
12+
"address": "127.0.0.1:703",
13+
"facility": "local7"
14+
}
15+
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"loggers": ["applogs", "audit"]
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "created"
3+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "full",
3+
"log_target_list": [
4+
{
5+
"address": "127.0.0.1:517",
6+
"facility": "local3"
7+
}
8+
]
9+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "bad name"
3+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "applogs",
3+
"log_target_list": [
4+
{
5+
"address": "127.0.0.1:600",
6+
"facility": "local5"
7+
}
8+
]
9+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "missing"
3+
}

0 commit comments

Comments
 (0)