Mercurial > hg > nginx-tests
comparison proxy_cache_variables.t @ 568:907e89fba9c3
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Sun, 03 May 2015 12:45:09 +0300 |
parents | b2c3d509b2f9 |
children | 2cd00179f4b2 |
comparison
equal
deleted
inserted
replaced
567:22bade4c7e12 | 568:907e89fba9c3 |
---|---|
22 select STDERR; $| = 1; | 22 select STDERR; $| = 1; |
23 select STDOUT; $| = 1; | 23 select STDOUT; $| = 1; |
24 | 24 |
25 plan(skip_all => 'win32') if $^O eq 'MSWin32'; | 25 plan(skip_all => 'win32') if $^O eq 'MSWin32'; |
26 | 26 |
27 my $t = Test::Nginx->new()->has(qw/http proxy cache/) | 27 my $t = Test::Nginx->new()->has(qw/http proxy cache/)->plan(9) |
28 ->write_file_expand('nginx.conf', <<'EOF'); | 28 ->write_file_expand('nginx.conf', <<'EOF'); |
29 | 29 |
30 %%TEST_GLOBALS%% | 30 %%TEST_GLOBALS%% |
31 | 31 |
32 daemon off; | 32 daemon off; |
68 | 68 |
69 EOF | 69 EOF |
70 | 70 |
71 $t->write_file('index.html', 'SEE-THIS'); | 71 $t->write_file('index.html', 'SEE-THIS'); |
72 | 72 |
73 $t->try_run('no proxy_cache with variables')->plan(9); | 73 $t->run(); |
74 | 74 |
75 ############################################################################### | 75 ############################################################################### |
76 | 76 |
77 like(http_get('/?c=NAME1'), qr/MISS.*SEE-THIS/ms, 'proxy request'); | 77 like(http_get('/?c=NAME1'), qr/MISS.*SEE-THIS/ms, 'proxy request'); |
78 like(http_get('/?c=NAME1'), qr/HIT.*SEE-THIS/ms, 'proxy request cached'); | 78 like(http_get('/?c=NAME1'), qr/HIT.*SEE-THIS/ms, 'proxy request cached'); |