Mercurial > hg > nginx-tests
comparison mirror.t @ 1381:97c8280de681
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 08 Oct 2018 15:30:39 +0300 |
parents | a6453cf5786a |
children |
comparison
equal
deleted
inserted
replaced
1380:f50c7d90f5c9 | 1381:97c8280de681 |
---|---|
20 ############################################################################### | 20 ############################################################################### |
21 | 21 |
22 select STDERR; $| = 1; | 22 select STDERR; $| = 1; |
23 select STDOUT; $| = 1; | 23 select STDOUT; $| = 1; |
24 | 24 |
25 my $t = Test::Nginx->new()->has(qw/http mirror/); | 25 my $t = Test::Nginx->new()->has(qw/http mirror/)->plan(8); |
26 | 26 |
27 $t->write_file_expand('nginx.conf', <<'EOF'); | 27 $t->write_file_expand('nginx.conf', <<'EOF'); |
28 | 28 |
29 %%TEST_GLOBALS%% | 29 %%TEST_GLOBALS%% |
30 | 30 |
65 EOF | 65 EOF |
66 | 66 |
67 $t->write_file('index.html', ''); | 67 $t->write_file('index.html', ''); |
68 $t->write_file('many', ''); | 68 $t->write_file('many', ''); |
69 $t->write_file('off', ''); | 69 $t->write_file('off', ''); |
70 $t->try_run('no mirror')->plan(8); | 70 $t->run(); |
71 | 71 |
72 ############################################################################### | 72 ############################################################################### |
73 | 73 |
74 like(http_get('/index.html?1'), qr/200 OK/, 'request'); | 74 like(http_get('/index.html?1'), qr/200 OK/, 'request'); |
75 like(http_get('/?2'), qr/200 OK/, 'internal redirect'); | 75 like(http_get('/?2'), qr/200 OK/, 'internal redirect'); |