@@ -8,13 +8,13 @@ repeat_each(1);
88plan tests => repeat_each() * (blocks() * 3 + 6 * 1);
99
1010our $http_config = <<'_EOC_' ;
11- proxy_cache_purge on;
12-
13- proxy_cache_path /tmp/ngx_cache_purge_cache keys_zone=test_cache:10m;
14- proxy_temp_path /tmp/ngx_cache_purge_temp 1 2;
11+ proxy_cache_path /tmp/ngx_cache_purge_cache keys_zone=test_cache:10m;
12+ proxy_temp_path /tmp/ngx_cache_purge_temp 1 2;
1513_EOC_
1614
1715our $config = <<'_EOC_' ;
16+ proxy_cache_purge on;
17+
1818 location /proxy {
1919 proxy_pass $scheme://127.0.0.1:$server_port/etc/passwd;
2020 proxy_cache test_cache;
@@ -142,7 +142,7 @@ X-Cache-Status: MISS
142142
143143
144144
145- === TEST 6: get from cache (again)
145+ === TEST 6: get from cache
146146--- http_config eval: $::http_config
147147--- config eval: $::config
148148--- request
@@ -157,7 +157,7 @@ X-Cache-Status: HIT
157157
158158
159159
160- === TEST 7: purge from cache
160+ === TEST 7: purge from cache (PURGE allowed)
161161--- http_config eval: $::http_config
162162--- config eval: $::config_allowed
163163--- request
@@ -171,7 +171,7 @@ Content-Type: text/html
171171
172172
173173
174- === TEST 8: purge from empty cache
174+ === TEST 8: purge from empty cache (PURGE allowed)
175175--- http_config eval: $::http_config
176176--- config eval: $::config_allowed
177177--- request
@@ -185,7 +185,7 @@ Content-Type: text/html
185185
186186
187187
188- === TEST 9: get from source
188+ === TEST 9: get from source (PURGE allowed)
189189--- http_config eval: $::http_config
190190--- config eval: $::config_allowed
191191--- request
@@ -200,7 +200,7 @@ X-Cache-Status: MISS
200200
201201
202202
203- === TEST 10: get from cache (again )
203+ === TEST 10: get from cache (PURGE allowed )
204204--- http_config eval: $::http_config
205205--- config eval: $::config_allowed
206206--- request
@@ -215,21 +215,21 @@ X-Cache-Status: HIT
215215
216216
217217
218- === TEST 11: purge from cache
218+ === TEST 11: purge from cache (PURGE not allowed)
219219--- http_config eval: $::http_config
220220--- config eval: $::config_forbidden
221221--- request
222222PURGE /proxy/passwd
223223--- error_code: 403
224224--- response_headers
225225Content-Type: text/html
226- --- response_body_like: Forbidden
226+ --- response_body_like: 403 Forbidden
227227--- timeout: 10
228228--- skip_nginx2: 3: < 0.8.3 or < 0.7.62
229229
230230
231231
232- === TEST 12: get from cache (again )
232+ === TEST 12: get from cache (PURGE not allowed )
233233--- http_config eval: $::http_config
234234--- config eval: $::config_forbidden
235235--- request
0 commit comments