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