[master] b849683 Add a test for HTTP/2 over Unix domain sockets.
Geoff Simmons
geoff at uplex.de
Thu Feb 22 09:23:10 UTC 2018
commit b849683397632efadf15f694be765bc4ea673bc4
Author: Geoff Simmons <geoff at uplex.de>
Date: Sun Feb 18 17:22:25 2018 +0100
Add a test for HTTP/2 over Unix domain sockets.
diff --git a/bin/varnishtest/tests/t02013.vtc b/bin/varnishtest/tests/t02013.vtc
new file mode 100644
index 0000000..47a226c
--- /dev/null
+++ b/bin/varnishtest/tests/t02013.vtc
@@ -0,0 +1,58 @@
+varnishtest "Direct H2 start over Unix domain sockets"
+
+server s1 {
+ rxreq
+ expect req.http.host == foo.bar
+ txresp \
+ -hdr "H234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789I: foo" \
+ -hdr "Foo: H234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789I" \
+ -bodylen 10
+} -start
+
+varnish v1 -arg "-a ${tmpdir}/v1.sock" -vcl+backend {
+ sub vcl_recv {
+ return (pipe);
+ }
+} -start
+
+varnish v1 -cliok "param.set debug +syncvsl"
+
+varnish v1 -cliok "param.set feature -http2"
+
+client c1 -connect "${tmpdir}/v1.sock" {
+ txpri
+ expect_close
+} -run
+
+varnish v1 -cliok "param.set feature +http2"
+
+client c1 -connect "${tmpdir}/v1.sock" {
+ stream 1 {
+ txprio -weight 10 -stream 0
+ } -run
+ stream 3 {
+ txprio -weight 10 -stream 0
+ } -run
+ stream 5 {
+ txprio -weight 10 -stream 2
+ } -run
+ stream 7 {
+ txreq -dep 3 -hdr :authority foo.bar -pad cotton
+ rxresp
+ expect resp.status == 200
+ delay 1
+ txrst -err 0x1111
+ } -start
+ stream 0 {
+ txping -data "_-__-_-_"
+ rxping
+ expect ping.ack == "true"
+ expect ping.data == "_-__-_-_"
+ } -run
+ stream 7 -wait
+} -run
+
+varnish v1 -expect MEMPOOL.req0.live == 0
+varnish v1 -expect MEMPOOL.req1.live == 0
+varnish v1 -expect MEMPOOL.sess0.live == 0
+varnish v1 -expect MEMPOOL.sess1.live == 0
More information about the varnish-commit
mailing list