Skip to content

Commit a0d8a34

Browse files
committed
Cleanup tests.
Change-Id: I203f92fe62c3f3f8204fdb7040c4e93956e8125c Signed-off-by: Piotr Sikora <[email protected]>
1 parent ab3df50 commit a0d8a34

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

t/proxy.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ X-Cache-Status: HIT
7171
--- http_config eval: $::http_config
7272
--- config eval: $::config
7373
--- request
74-
DELETE /purge/proxy/passwd
74+
PURGE /purge/proxy/passwd
7575
--- error_code: 200
7676
--- response_headers
7777
Content-Type: text/html
@@ -85,7 +85,7 @@ Content-Type: text/html
8585
--- http_config eval: $::http_config
8686
--- config eval: $::config
8787
--- request
88-
DELETE /purge/proxy/passwd
88+
PURGE /purge/proxy/passwd
8989
--- error_code: 404
9090
--- response_headers
9191
Content-Type: text/html
@@ -110,7 +110,7 @@ X-Cache-Status: MISS
110110
111111
112112
113-
=== TEST 6: get from cache (again)
113+
=== TEST 6: get from cache
114114
--- http_config eval: $::http_config
115115
--- config eval: $::config
116116
--- request

t/proxy2.t

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ repeat_each(1);
88
plan tests => repeat_each() * (blocks() * 3 + 6 * 1);
99

1010
our $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

1715
our $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
222222
PURGE /proxy/passwd
223223
--- error_code: 403
224224
--- response_headers
225225
Content-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

Comments
 (0)