Mercurial > hg > nginx-tests
comparison fastcgi_keepalive.t @ 272:957fe2a76aa7
Tests: remove conditional startup from upstream keepalive tests.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 21 Mar 2013 20:40:26 +0400 |
parents | 9f0ed4d54ae3 |
children | 36c75df75ca4 |
comparison
equal
deleted
inserted
replaced
271:1a6eef7ac914 | 272:957fe2a76aa7 |
---|---|
19 ############################################################################### | 19 ############################################################################### |
20 | 20 |
21 select STDERR; $| = 1; | 21 select STDERR; $| = 1; |
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 my $t = Test::Nginx->new()->write_file_expand('nginx.conf', <<'EOF'); | 24 my $t = Test::Nginx->new()->write_file_expand('nginx.conf', <<'EOF')->plan(6); |
25 | 25 |
26 %%TEST_GLOBALS%% | 26 %%TEST_GLOBALS%% |
27 | 27 |
28 daemon off; | 28 daemon off; |
29 | 29 |
50 } | 50 } |
51 | 51 |
52 EOF | 52 EOF |
53 | 53 |
54 $t->run_daemon(\&fastcgi_test_daemon); | 54 $t->run_daemon(\&fastcgi_test_daemon); |
55 | 55 $t->run(); |
56 eval { | |
57 open OLDERR, ">&", \*STDERR; close STDERR; | |
58 $t->run(); | |
59 open STDERR, ">&", \*OLDERR; | |
60 }; | |
61 plan(skip_all => 'no keepalive patches') if $@; | |
62 | |
63 $t->plan(6); | |
64 | 56 |
65 ############################################################################### | 57 ############################################################################### |
66 | 58 |
67 like(http_get('/'), qr/SEE-THIS/, 'fastcgi request'); | 59 like(http_get('/'), qr/SEE-THIS/, 'fastcgi request'); |
68 like(http_get('/redir'), qr/302/, 'fastcgi redirect'); | 60 like(http_get('/redir'), qr/302/, 'fastcgi redirect'); |