Skip to content

Commit 2552fb2

Browse files
committed
REGTESTS: add basic QMux tests
Write two simple QMux tests, for http/3 in SSL and clear.
1 parent 4a540a4 commit 2552fb2

3 files changed

Lines changed: 78 additions & 0 deletions

File tree

reg-tests/qmux/certs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../ssl/certs

reg-tests/qmux/h3.vtc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
varnishtest "HTTP/3 over QMux"
2+
feature ignore_unknown_macro
3+
4+
# TODO to adjust once QMux compilation is QUIC/SSL free
5+
feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && !feature(QUIC_OPENSSL_COMPAT) && !feature(OPENSSL_WOLFSSL) && ssllib_name_startswith(OpenSSL) && openssl_version_atleast(1.1.1)'"
6+
7+
haproxy h1 -conf {
8+
global
9+
.if feature(THREAD)
10+
thread-groups 1
11+
.endif
12+
expose-experimental-directives
13+
ssl-server-verify none
14+
15+
defaults
16+
mode http
17+
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
18+
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
19+
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
20+
21+
frontend fterm
22+
bind "fd@${fterm}" ssl crt ${testdir}/certs/common.pem alpn h3
23+
http-request return status 200 hdr x-alpn %[ssl_fc_alpn] hdr x-ver %[req.ver]
24+
25+
frontend fpub
26+
bind "fd@${fpub}" proto h1
27+
use_backend be
28+
29+
backend be
30+
server hap ${h1_fterm_addr}:${h1_fterm_port} ssl alpn h3
31+
} -start
32+
33+
client c1 -connect ${h1_fpub_sock} {
34+
txreq
35+
rxresp
36+
expect resp.status == 200
37+
expect resp.http.x-alpn == "h3"
38+
expect resp.http.x-ver == "3.0"
39+
} -run

reg-tests/qmux/h3_clr.vtc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
varnishtest "HTTP/3 over clear QMux"
2+
feature ignore_unknown_macro
3+
4+
# TODO to adjust once QMux compilation is QUIC/SSL free
5+
feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && !feature(QUIC_OPENSSL_COMPAT) && !feature(OPENSSL_WOLFSSL) && ssllib_name_startswith(OpenSSL) && openssl_version_atleast(1.1.1)'"
6+
feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(3.4-dev14)'"
7+
8+
haproxy h1 -conf {
9+
global
10+
.if feature(THREAD)
11+
thread-groups 1
12+
.endif
13+
expose-experimental-directives
14+
15+
defaults
16+
mode http
17+
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
18+
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
19+
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
20+
21+
frontend fterm
22+
bind "fd@${fterm}" proto qmux
23+
http-request return status 200 hdr x-ver %[req.ver]
24+
25+
frontend fpub
26+
bind "fd@${fpub}" proto h1
27+
use_backend be
28+
29+
backend be
30+
server hap ${h1_fterm_addr}:${h1_fterm_port} proto qmux
31+
} -start
32+
33+
client c1 -connect ${h1_fpub_sock} {
34+
txreq
35+
rxresp
36+
expect resp.status == 200
37+
expect resp.http.x-ver == "3.0"
38+
} -run

0 commit comments

Comments
 (0)