Mercurial > hg > nginx-tests
changeset 593:6c0a5903d0ae
Tests: cleanup now duplicating tests for no alerts.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 27 May 2015 17:09:22 +0300 |
parents | 355f2d5ff60f |
children | 8dd5cf697eae |
files | image_filter_finalize.t memcached_keepalive.t memcached_keepalive_stale.t mp4.t post_action.t proxy_cache.t proxy_cache_path.t proxy_cache_range.t proxy_cache_variables.t proxy_force_ranges.t proxy_keepalive.t ssi.t ssi_if.t ssi_waited.t |
diffstat | 14 files changed, 14 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/image_filter_finalize.t Wed May 27 16:58:35 2015 +0300 +++ b/image_filter_finalize.t Wed May 27 17:09:22 2015 +0300 @@ -22,7 +22,7 @@ select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http proxy cache image_filter limit_req/) - ->has(qw/rewrite shmem/)->plan(4) + ->has(qw/rewrite shmem/)->plan(3) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -142,6 +142,4 @@ http_get('/t3'); like(http_get('/time.log'), qr!/t3:.*, [1-9]\.!, 'upstream response time'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################
--- a/memcached_keepalive.t Wed May 27 16:58:35 2015 +0300 +++ b/memcached_keepalive.t Wed May 27 17:09:22 2015 +0300 @@ -25,7 +25,7 @@ plan(skip_all => 'Cache::Memcached not installed') if $@; my $t = Test::Nginx->new()->has(qw/http memcached upstream_keepalive rewrite/) - ->has_daemon('memcached')->plan(16) + ->has_daemon('memcached')->plan(15) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -190,8 +190,4 @@ $memd2->stats()->{total}->{total_connections}, $total + 2, 'connection per backend'); -$t->stop(); - -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################
--- a/memcached_keepalive_stale.t Wed May 27 16:58:35 2015 +0300 +++ b/memcached_keepalive_stale.t Wed May 27 17:09:22 2015 +0300 @@ -25,7 +25,7 @@ plan(skip_all => 'Cache::Memcached not installed') if $@; my $t = Test::Nginx->new()->has(qw/http memcached upstream_keepalive rewrite/) - ->has_daemon('memcached')->plan(2) + ->has_daemon('memcached')->plan(1) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -118,8 +118,4 @@ cmp_ok($memd1->stats()->{total}->{total_connections}, '<=', $total + 2, 'only one connection per worker used'); -$t->stop(); - -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################
--- a/mp4.t Wed May 27 16:58:35 2015 +0300 +++ b/mp4.t Wed May 27 17:09:22 2015 +0300 @@ -58,7 +58,7 @@ . "${\($t->testdir())}/test.mp4") == 0 or die "Can't create mp4 file: $!"; -$t->run()->plan(14); +$t->run()->plan(13); ############################################################################### @@ -86,10 +86,6 @@ 'start beyond short track'); like(http_head("/test.mp4?start=21"), qr!HTTP/1.1 500!, 'start beyond EOF'); -# check for alerts, e.g., "zero buf in output", shouldn't be any - -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ############################################################################### sub durations {
--- a/post_action.t Wed May 27 16:58:35 2015 +0300 +++ b/post_action.t Wed May 27 17:09:22 2015 +0300 @@ -22,7 +22,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(6); +my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(5); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -78,6 +78,4 @@ like(`cat ${\($t->testdir())}/access.log`, qr/post/, 'post action in logs'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################
--- a/proxy_cache.t Wed May 27 16:58:35 2015 +0300 +++ b/proxy_cache.t Wed May 27 17:09:22 2015 +0300 @@ -21,7 +21,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy cache gzip shmem/)->plan(14) +my $t = Test::Nginx->new()->has(qw/http proxy cache gzip shmem/)->plan(13) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -110,8 +110,6 @@ qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, 'empty get stale'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ############################################################################### sub http_get_range {
--- a/proxy_cache_path.t Wed May 27 16:58:35 2015 +0300 +++ b/proxy_cache_path.t Wed May 27 17:09:22 2015 +0300 @@ -22,7 +22,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(7) +my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(6) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -84,6 +84,4 @@ like(http_get('/t?c=OFF'), qr/HIT.*SEE-THIS/ms, 'temp path cached off'); like(http_get('/t?c=LEVELS'), qr/HIT.*SEE-THIS/ms, 'temp path cached levels'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################
--- a/proxy_cache_range.t Wed May 27 16:58:35 2015 +0300 +++ b/proxy_cache_range.t Wed May 27 17:09:22 2015 +0300 @@ -21,7 +21,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(7) +my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(6) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -91,8 +91,6 @@ like(http_get_range('/min_uses/t.html?4', 'Range: bytes=0-2,4-'), qr/^SEE.*^THIS/ms, 'multipart range below min_uses'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ############################################################################### sub http_get_range {
--- a/proxy_cache_variables.t Wed May 27 16:58:35 2015 +0300 +++ b/proxy_cache_variables.t Wed May 27 17:09:22 2015 +0300 @@ -22,7 +22,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(9) +my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(8) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -91,6 +91,4 @@ like(http_get('/'), qr/SEE-THOSE/, 'proxy_cache empty - not cached'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################
--- a/proxy_force_ranges.t Wed May 27 16:58:35 2015 +0300 +++ b/proxy_force_ranges.t Wed May 27 17:09:22 2015 +0300 @@ -23,7 +23,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(5) +my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(4) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -85,8 +85,6 @@ like(http_get_range('/cache/t.html', 'Range: bytes=0-2,4-'), qr/^SEE.*^THIS/ms, 'cached multipart range'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ############################################################################### sub http_get_range {
--- a/proxy_keepalive.t Wed May 27 16:58:35 2015 +0300 +++ b/proxy_keepalive.t Wed May 27 17:09:22 2015 +0300 @@ -25,7 +25,7 @@ select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http proxy upstream_keepalive ssi rewrite/) - ->plan(50)->write_file_expand('nginx.conf', <<'EOF'); + ->plan(49)->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -209,7 +209,6 @@ # check for errors, shouldn't be any -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); like(`grep -F '[error]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no errors'); ###############################################################################
--- a/ssi.t Wed May 27 16:58:35 2015 +0300 +++ b/ssi.t Wed May 27 17:09:22 2015 +0300 @@ -22,7 +22,7 @@ select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http ssi cache proxy rewrite shmem/) - ->plan(28); + ->plan(27); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -190,6 +190,4 @@ like(http_get('/var_format.html'), qr/x\w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d [\w ]+x/, 'default ssi'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################
--- a/ssi_if.t Wed May 27 16:58:35 2015 +0300 +++ b/ssi_if.t Wed May 27 17:09:22 2015 +0300 @@ -22,7 +22,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http ssi/)->plan(44); +my $t = Test::Nginx->new()->has(qw/http ssi/)->plan(43); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -270,7 +270,4 @@ } - -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################
--- a/ssi_waited.t Wed May 27 16:58:35 2015 +0300 +++ b/ssi_waited.t Wed May 27 17:09:22 2015 +0300 @@ -21,7 +21,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http ssi/)->plan(2); +my $t = Test::Nginx->new()->has(qw/http ssi/)->plan(1); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -59,6 +59,4 @@ like(http_get('/'), qr/^xFIRSTxWAITEDxSECONDx$/m, 'waited non-active'); -like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); - ###############################################################################