blob: bac19d8fdfdf3bcec92037097f90bb971ef2dc3d [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
Christopher Faulet8f161482018-12-19 11:49:39 +010029 ${no-htx} option http-use-htx
Willy Tarreauf490f302018-11-23 08:36:06 +010030 dispatch ${s2_addr}:${s2_port}
31} -start
32
33client c1 -connect ${h1_fe_tcp_sock} {
34 txreq -url "/"
35 rxresp
36 expect resp.status == 200
37} -run
38
39client c2 -connect ${h1_fe_http_sock} {
40 txreq -url "/"
41 rxresp
42 expect resp.status == 200
43} -run