blob: 3977f4ca5def9916ea078fbf52c5ff331e16286f [file] [log] [blame]
William Lallemand072335e2022-09-13 10:34:36 +02001varnishtest "Test the TCP load-forward"
2feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.3-dev1)'"
3feature ignore_unknown_macro
4
5server s1 {
6 rxreq
7 txresp
8} -repeat 500 -start
9
10syslog Slg1 -level info {
11 recv
12 expect ~ "[^:\\[ ]\\[${h1_pid}\\]: .* \"GET /client_c1 HTTP/1.1\""
13} -repeat 50 -start
14
15haproxy h1 -conf {
16 defaults
17 mode http
18 option httplog
19 timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
20 timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
21 timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
22
23 frontend fe1
24 bind "fd@${fe_1}"
25 log 127.0.0.1:1514 local0
26# log ${Slg1_addr}:${Slg1_port} local0
27 default_backend be
28
29 backend be
30 server app1 ${s1_addr}:${s1_port}
31
32 ring myring
33 description "My local buffer"
34 format rfc5424
35 maxlen 1200
36 size 32764
37 timeout connect 5s
38 timeout server 10s
39 # syslog tcp server
40 server mysyslogsrv 127.0.0.1:2514
41
42 log-forward syslog2tcp
43 dgram-bind 127.0.0.1:1514
44 log ring@myring local0 # To TCP log
45
46 log-forward syslog2local
47 bind 127.0.0.1:2514
48 log ${Slg1_addr}:${Slg1_port} local0 # To VTest syslog
49} -start
50
51client c1 -connect ${h1_fe_1_sock} {
52 txreq -url "/client_c1"
53 rxresp
54 expect resp.status == 200
55} -repeat 50 -start
56
57syslog Slg1 -wait