]>
git.cameronkatri.com Git - cgit.git/blob - tests/t0020-validate-cache.sh
5 prepare_tests
'Validate cache'
7 run_test
'verify cache-size=0' '
10 sed -i -e "s/cache-size=1021$/cache-size=0/" trash/cgitrc &&
13 cgit_url "foo/refs" &&
14 cgit_url "foo/tree" &&
16 cgit_url "foo/diff" &&
17 cgit_url "foo/patch" &&
19 cgit_url "bar/refs" &&
20 cgit_url "bar/tree" &&
22 cgit_url "bar/diff" &&
23 cgit_url "bar/patch" &&
24 test 0 -eq $(ls trash/cache | wc -l)
27 run_test
'verify cache-size=1' '
29 rm -f trash/cache/* &&
30 sed -i -e "s/cache-size=0$/cache-size=1/" trash/cgitrc &&
33 cgit_url "foo/refs" &&
34 cgit_url "foo/tree" &&
36 cgit_url "foo/diff" &&
37 cgit_url "foo/patch" &&
39 cgit_url "bar/refs" &&
40 cgit_url "bar/tree" &&
42 cgit_url "bar/diff" &&
43 cgit_url "bar/patch" &&
44 test 1 -eq $(ls trash/cache | wc -l)
47 run_test
'verify cache-size=1021' '
49 rm -f trash/cache/* &&
50 sed -i -e "s/cache-size=1$/cache-size=1021/" trash/cgitrc &&
53 cgit_url "foo/refs" &&
54 cgit_url "foo/tree" &&
56 cgit_url "foo/diff" &&
57 cgit_url "foo/patch" &&
59 cgit_url "bar/refs" &&
60 cgit_url "bar/tree" &&
62 cgit_url "bar/diff" &&
63 cgit_url "bar/patch" &&
64 test 13 -eq $(ls trash/cache | wc -l)