blob: fccd6ec4b964fe01bfb8010f8a936ac65e0c5c29 [file] [log] [blame]
Willy Tarreauf490f302018-11-23 08:36:06 +01001varnishtest "Validate proper operation of the 'dispatch' mode"
2feature ignore_unknown_macro
3
4server s1 {
5 rxreq
6 txresp
7} -start
8
9server s2 {
10 rxreq
11 txresp
12} -start
13
14haproxy h1 -conf {
15defaults
16 log global
17 timeout connect 1s
18 timeout client 1s
19 timeout server 1s
20
21listen fe_tcp
22 bind "fd@${fe_tcp}"
23 mode tcp
24 dispatch ${s1_addr}:${s1_port}
25
26listen fe_http
27 bind "fd@${fe_http}"
28 mode http
29 dispatch ${s2_addr}:${s2_port}
30} -start
31
32client c1 -connect ${h1_fe_tcp_sock} {
33 txreq -url "/"
34 rxresp
35 expect resp.status == 200
36} -run
37
38client c2 -connect ${h1_fe_http_sock} {
39 txreq -url "/"
40 rxresp
41 expect resp.status == 200
42} -run