blob: e8255af5132a28eca64235931b6e243f980ce39a [file] [log] [blame]
Frédéric Lécaillea3fe1bb2018-11-28 11:36:48 +01001varnishtest "Basic cache test"
2
Willy Tarreau86ff9c82018-12-12 15:21:56 +01003#REQUIRE_VERSION=1.9
Frédéric Lécaillea3fe1bb2018-11-28 11:36:48 +01004
5feature ignore_unknown_macro
6
7server s1 {
8 rxreq
9 txresp -nolen -hdr "Transfer-Encoding: chunked"
10 chunkedlen 1
11 chunkedlen 1
12 chunkedlen 2
13 chunkedlen 3
14 chunkedlen 5
15 chunkedlen 8
16 chunkedlen 13
17 chunkedlen 21
18 chunkedlen 34
19 chunkedlen 55
20 chunkedlen 89
21 chunkedlen 144
22 chunkedlen 233
23 chunkedlen 0
24} -start
25
26haproxy h1 -conf {
27 defaults
28 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010029 ${no-htx} option http-use-htx
Frédéric Lécaillea3fe1bb2018-11-28 11:36:48 +010030 timeout connect 1s
31 timeout client 1s
32 timeout server 1s
33
34 frontend fe
35 bind "fd@${fe}"
36 default_backend test
37
38 backend test
39 http-request cache-use my_cache
40 server www ${s1_addr}:${s1_port}
41 http-response cache-store my_cache
42
43 cache my_cache
44 total-max-size 3
45 max-age 20
46 max-object-size 3072
47} -start
48
49
50client c1 -connect ${h1_fe_sock} {
51 txreq
52 rxresp
53 expect resp.status == 200
54 expect resp.bodylen == 609
55} -repeat 4 -run