blob: 5195816a9c79d5bae46d3bb18cb5a1a89d8db6f6 [file] [log] [blame]
Frédéric Lécaillea3fe1bb2018-11-28 11:36:48 +01001varnishtest "Basic cache test"
2
3#REQUIRE_VERSION=1.8
4
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
29 timeout connect 1s
30 timeout client 1s
31 timeout server 1s
32
33 frontend fe
34 bind "fd@${fe}"
35 default_backend test
36
37 backend test
38 http-request cache-use my_cache
39 server www ${s1_addr}:${s1_port}
40 http-response cache-store my_cache
41
42 cache my_cache
43 total-max-size 3
44 max-age 20
45 max-object-size 3072
46} -start
47
48
49client c1 -connect ${h1_fe_sock} {
50 txreq
51 rxresp
52 expect resp.status == 200
53 expect resp.bodylen == 609
54} -repeat 4 -run