Mercurial > hg > nginx-tests
diff fastcgi.t @ 131:21a428b31f37
Tests: add test for fastcgi regression introduced in 0.8.34.
Besides marking as TODO use todo_skip unless TEST_NGINX_UNSAFE defined
as it causes coredump.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 11 Mar 2010 02:30:44 +0300 |
parents | 8ac1faaddd2c |
children | b436d71bb41b |
line wrap: on
line diff
--- a/fastcgi.t Thu Mar 11 02:31:56 2010 +0300 +++ b/fastcgi.t Thu Mar 11 02:30:44 2010 +0300 @@ -24,7 +24,7 @@ eval { require FCGI; }; plan(skip_all => 'FCGI not installed') if $@; -my $t = Test::Nginx->new()->has(qw/http fastcgi/)->plan(4) +my $t = Test::Nginx->new()->has(qw/http fastcgi/)->plan(5) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -44,6 +44,7 @@ location / { fastcgi_pass 127.0.0.1:8081; + fastcgi_param REQUEST_URI $request_uri; } } } @@ -61,6 +62,14 @@ unlike(http_head('/'), qr/SEE-THIS/, 'no data in HEAD'); +TODO: { +local $TODO = 'coredumps in 0.8.34'; +todo_skip $TODO, 1 unless $ENV{TEST_NGINX_UNSAFE}; + +like(http_get('/stderr'), qr/SEE-THIS/, 'large stderr handled'); + +} + ############################################################################### sub fastcgi_daemon { @@ -71,6 +80,11 @@ my $count; while( $request->Accept() >= 0 ) { $count++; + + if ($ENV{REQUEST_URI} eq '/stderr') { + warn "sample stderr text" x 512; + } + print <<EOF; Location: http://127.0.0.1:8080/redirect Content-Type: text/html