haproxy/reg-tests/quic/retry.vtc
Frederic Lecaille 0839fb46db REGTESTS: ssl: Move all the SSL certificates, keys, crt-lists inside "certs" directory
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"
 }
2025-11-28 12:24:25 +01:00

84 lines
2.3 KiB
Plaintext

varnishtest "Two simple h3 tests (with and without QUIC RETRY)"
feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(3.3-dev2)'"
# QUIC backend are not supported with USE_QUIC_OPENSSL_COMPAT
feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && !feature(QUIC_OPENSSL_COMPAT) && !feature(OPENSSL_WOLFSSL)'"
feature ignore_unknown_macro
server s1 {
rxreq
txresp
} -repeat 2 -start
haproxy ha2 -conf {
global
.if feature(THREAD)
thread-groups 1
.endif
# Uncomment these lines to get some debug traces on stderr
# traces
# trace quic sink stderr level developer start now
# trace ssl sink stderr level developer verbosity complete start now
defaults
mode http
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
listen quic_lstnr
bind "quic+fd@${fe_quic}" ssl crt ${testdir}/certs/common.pem
server srv ${s1_addr}:${s1_port}
listen quic_lstnr_retry
bind "quic+fd@${fe_quic_retry}" ssl crt ${testdir}/certs/common.pem quic-force-retry
server srv ${s1_addr}:${s1_port}
} -start
haproxy ha1 -conf {
global
expose-experimental-directives
.if feature(THREAD)
thread-groups 1
.endif
# Uncomment these lines to get some debug traces on stderr
# traces
# trace quic sink stderr level developer start now
# trace ssl sink stderr level developer verbosity complete start now
defaults
mode http
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
backend quic_be
server quic quic4@${ha2_fe_quic_addr}:${ha2_fe_quic_port} ssl verify none
backend quic_be_retry
server quic_retry quic4@${ha2_fe_quic_retry_addr}:${ha2_fe_quic_retry_port} ssl verify none
frontend fe_wo_retry
bind "fd@${fe}"
use_backend quic_be
frontend fe_with_retry
bind "fd@${fe_retry}"
use_backend quic_be_retry
} -start
client c1 -connect ${ha1_fe_sock} {
txreq
rxresp
expect resp.status == 200
} -run
client c2 -connect ${ha1_fe_retry_sock} {
txreq
rxresp
expect resp.status == 200
} -run