comparison proxy_cache_vary.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 34280f6b0bc6
children 2cd00179f4b2
comparison
equal deleted inserted replaced
567:22bade4c7e12 568:907e89fba9c3
21 select STDERR; $| = 1; 21 select STDERR; $| = 1;
22 select STDOUT; $| = 1; 22 select STDOUT; $| = 1;
23 23
24 plan(skip_all => 'win32') if $^O eq 'MSWin32'; 24 plan(skip_all => 'win32') if $^O eq 'MSWin32';
25 25
26 my $t = Test::Nginx->new()->has(qw/http proxy cache gzip rewrite/) 26 my $t = Test::Nginx->new()->has(qw/http proxy cache gzip rewrite/)->plan(42)
27 ->write_file_expand('nginx.conf', <<'EOF'); 27 ->write_file_expand('nginx.conf', <<'EOF');
28 28
29 %%TEST_GLOBALS%% 29 %%TEST_GLOBALS%%
30 30
31 daemon off; 31 daemon off;
101 101
102 $t->write_file('index.html', 'SEE-THIS'); 102 $t->write_file('index.html', 'SEE-THIS');
103 $t->write_file('asterisk', 'SEE-THIS'); 103 $t->write_file('asterisk', 'SEE-THIS');
104 $t->write_file('complex', 'SEE-THIS'); 104 $t->write_file('complex', 'SEE-THIS');
105 105
106 $t->try_run('no proxy_ignore_headers Vary')->plan(42); 106 $t->run();
107 107
108 ############################################################################### 108 ###############################################################################
109
110 local $TODO = 'not yet' unless $t->has_version('1.7.7');
111 109
112 like(get('/', 'gzip'), qr/MISS/ms, 'first request'); 110 like(get('/', 'gzip'), qr/MISS/ms, 'first request');
113 like(get('/', 'gzip'), qr/HIT/ms, 'vary match cached'); 111 like(get('/', 'gzip'), qr/HIT/ms, 'vary match cached');
114 like(get('/', 'deflate'), qr/MISS/ms, 'vary mismatch'); 112 like(get('/', 'deflate'), qr/MISS/ms, 'vary mismatch');
115 like(get('/', 'deflate'), qr/HIT/ms, 'vary mismatch cached'); 113 like(get('/', 'deflate'), qr/HIT/ms, 'vary mismatch cached');