mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-02 08:11:29 +01:00
Move all these files and others for OCSP tests found into reg-tests/ssl
to reg-test/ssl/certs and adapt all the VTC files which use them.
This patch is needed by other tests which have to include the SSL tests.
Indeed, some VTC commands contain paths to these files which cannot
be customized with environment variables, depending on the location the VTC file
is runi from, because VTC does not resolve the environment variables. Only macros
as ${testdir} can be resolved.
For instance this command run from a VTC file from reg-tests/ssl directory cannot
be reused from another directory, except if we add a symbolic link for each certs,
key etc.
haproxy h1 -cli {
send "del ssl crt-list ${testdir}/localhost.crt-list ${testdir}/common.pem:1"
}
This is not what we want. We add a symbolic link to reg-test/ssl/certs to the
directory and modify the command above as follows:
haproxy h1 -cli {
send "del ssl crt-list ${testdir}/certs/localhost.crt-list ${testdir}/certs/common.pem:1"
}
65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
varnishtest "Test the TCP+SSL load-forward"
|
|
feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.3-dev1)'"
|
|
feature cmd "$HAPROXY_PROGRAM -cc 'feature(OPENSSL)'"
|
|
feature ignore_unknown_macro
|
|
|
|
server s1 {
|
|
rxreq
|
|
txresp
|
|
} -repeat 500 -start
|
|
|
|
syslog Slg1 -level info {
|
|
recv
|
|
expect ~ "[^:\\[ ]\\[${h1_pid}\\]: .* \"GET /client_c1 HTTP/1.1\""
|
|
} -repeat 50 -start
|
|
|
|
haproxy h1 -conf {
|
|
global
|
|
.if feature(THREAD)
|
|
thread-groups 1
|
|
.endif
|
|
|
|
insecure-fork-wanted
|
|
defaults
|
|
mode http
|
|
option httplog
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
frontend fe1
|
|
bind "fd@${fe_1}"
|
|
log 127.0.0.1:1514 local0
|
|
# log ${Slg1_addr}:${Slg1_port} local0
|
|
default_backend be
|
|
|
|
backend be
|
|
server app1 ${s1_addr}:${s1_port}
|
|
|
|
ring myring
|
|
description "My local buffer"
|
|
format rfc5424
|
|
maxlen 1200
|
|
size 32764
|
|
timeout connect 5s
|
|
timeout server 10s
|
|
# syslog tcp server
|
|
server mysyslogsrv 127.0.0.1:2514 ssl verify none
|
|
|
|
log-forward syslog2tcp
|
|
dgram-bind 127.0.0.1:1514
|
|
log ring@myring local0 # To TCP log
|
|
|
|
log-forward syslog2local
|
|
bind 127.0.0.1:2514 ssl crt ${testdir}/certs/common.pem
|
|
log ${Slg1_addr}:${Slg1_port} local0 # To VTest syslog
|
|
} -start
|
|
|
|
client c1 -connect ${h1_fe_1_sock} {
|
|
txreq -url "/client_c1"
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -repeat 50 -start
|
|
|
|
syslog Slg1 -wait
|