[6.0] 082e6bc51 Add a test with HAproxy in daemonmode (if available)
Poul-Henning Kamp
phk at FreeBSD.org
Thu Aug 16 08:52:26 UTC 2018
commit 082e6bc51f2cefaa557e32f312727afe1bdab909
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Mar 28 14:16:43 2018 +0000
Add a test with HAproxy in daemonmode (if available)
diff --git a/bin/varnishtest/tests/h00002.vtc b/bin/varnishtest/tests/h00002.vtc
new file mode 100644
index 000000000..6e2af6651
--- /dev/null
+++ b/bin/varnishtest/tests/h00002.vtc
@@ -0,0 +1,32 @@
+varnishtest "Basic HAproxy test (daemon mode)"
+
+feature ignore_unknown_macro
+
+feature cmd {haproxy --version 2>&1 | grep -q 'HA-Proxy version'}
+
+server s1 {
+ rxreq
+ txresp -body "s1 >>> Hello world!"
+} -start
+
+haproxy h1 -arg "-D" -conf {
+ defaults
+ mode http
+ timeout connect 5s
+ timeout server 30s
+ timeout client 30s
+
+ backend be1
+ server srv1 ${s1_addr}:${s1_port}
+
+ frontend http1
+ use_backend be1
+ bind "fd@${fe1}"
+} -start
+
+client c1 -connect ${h1_fe1_sock} {
+ txreq -url "/"
+ rxresp
+ expect resp.status == 200
+ expect resp.body == "s1 >>> Hello world!"
+} -run
More information about the varnish-commit
mailing list