changeset 317:a9621dbbd0d4

Tests: remove TODOs with 1.3.x version checks.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 23 Jul 2013 20:25:05 +0400
parents f36c3532a117
children 68b94b83412b
files auth_basic.t body_chunked.t dav_chunked.t fastcgi_body.t proxy_upgrade.t proxy_websocket.t range_if_range.t realip.t scgi_body.t upstream.t
diffstat 10 files changed, 2 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/auth_basic.t
+++ b/auth_basic.t
@@ -101,14 +101,9 @@ SKIP: {
 		or $t->has_module('--with-openssl');
 
 	like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha');
-
-TODO: {
-	local $TODO = 'not yet' unless $t->has_version('1.3.13');
 	like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha');
 }
 
-}
-
 unlike(http_get_auth('/', 'apr1', '123'), qr!SEETHIS!, 'apr1 md5 wrong');
 unlike(http_get_auth('/', 'plain', '123'), qr!SEETHIS!, 'plain wrong');
 unlike(http_get_auth('/', 'ssha', '123'), qr!SEETHIS!, 'ssha wrong');
--- a/body_chunked.t
+++ b/body_chunked.t
@@ -99,9 +99,6 @@ EOF
 
 ###############################################################################
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.3.9');
-
 like(http_get_body('/', '0123456789'),
 	qr/X-Body: 0123456789\x0d?$/ms, 'body');
 
@@ -136,8 +133,6 @@ like(http_get_body('/discard', '01234567
 like(http_get_body('/next', '0123456789'),
         qr/X-Body: 0123456789\x0d?$/ms, 'body chunked next upstream');
 
-}
-
 ###############################################################################
 
 sub read_body_file {
--- a/dav_chunked.t
+++ b/dav_chunked.t
@@ -55,9 +55,6 @@ EOF
 
 ###############################################################################
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.3.9');
-
 my $r;
 
 $r = http(<<EOF);
@@ -102,8 +99,6 @@ EOF
 like($r, qr/204 No Content/, 'put chunked big');
 is(read_file($t->testdir() . '/file'), '1234567890' x 1024, 'put big content');
 
-}
-
 ###############################################################################
 
 sub read_file {
--- a/fastcgi_body.t
+++ b/fastcgi_body.t
@@ -62,9 +62,6 @@ like(http_get('/'), qr/X-Body: /, 'fastc
 like(http_get_length('/', ''), qr/X-Body: /, 'fastcgi empty body');
 like(http_get_length('/', 'foobar'), qr/X-Body: foobar/, 'fastcgi body');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.3.9');
-
 like(http(<<EOF), qr/X-Body: foobar/, 'fastcgi chunked');
 GET / HTTP/1.1
 Host: localhost
@@ -87,8 +84,6 @@ 0
 
 EOF
 
-}
-
 ###############################################################################
 
 sub http_get_length {
--- a/proxy_upgrade.t
+++ b/proxy_upgrade.t
@@ -66,9 +66,6 @@ EOF
 
 ###############################################################################
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.3.13');
-
 # establish connection
 
 my $s = upgrade_connect();
@@ -116,12 +113,11 @@ SKIP: {
 	is(upgrade_read($s), "bar", "next to pipelined");
 }
 
-}
-
 # connection should not be upgraded unless upgrade was actually
 # requested and allowed by configuration
 
-my $s = upgrade_connect(noheader => 1);
+undef $s;
+$s = upgrade_connect(noheader => 1);
 ok(!$s, "handshake noupgrade");
 
 ###############################################################################
--- a/proxy_websocket.t
+++ b/proxy_websocket.t
@@ -72,9 +72,6 @@ EOF
 
 ###############################################################################
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.3.13');
-
 # establish websocket connection
 
 my $s = websocket_connect();
@@ -122,8 +119,6 @@ SKIP: {
 	is(websocket_read($s), "bar", "next to pipelined");
 }
 
-}
-
 ###############################################################################
 
 sub websocket_connect {
--- a/range_if_range.t
+++ b/range_if_range.t
@@ -78,27 +78,13 @@ like($t1, qr/206/, 'if-range');
 # If-Range + add_header Last-Modified ""
 
 $t1 = http_get_range('/t2.html', "Range: bytes=0-9\nIf-Range: wrong");
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.3.3');
-
 like($t1, qr/200 OK/, 'if-range notime');
-
-}
-
 unlike($t1, qr/Last-Modified: /, 'if-range notime - no last modified');
 
 # If-Range + add_header Last-Modified "Mon, 28 Sep 1970 06:00:00 GMT"
 
 $t1 = http_get_range('/t3.html', "Range: bytes=0-9\nIf-Range: wrong");
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.3.3');
-
 like($t1, qr/200 OK/, 'if-range time wrong');
-
-}
-
 like($t1, qr/Last-Modified: Mon, 28 Sep 1970 06:00:00 GMT/,
 	'if-range time wrong - last modified');
 
--- a/realip.t
+++ b/realip.t
@@ -77,10 +77,6 @@ like(http_xff('/1', '192.0.2.1, 10.0.1.1
 like(http_xff('/2', '10.0.1.1, 192.0.2.1, 127.0.0.1'),
 	qr/^X-IP: 192.0.2.1/m, 'realip recursive on');
 
-TODO: {
-
-local $TODO = 'not yet' unless $t->has_version('1.3.14');
-
 like(http(<<EOF), qr/^X-IP: 10.0.1.1/m, 'realip multi xff recursive off');
 GET /1 HTTP/1.0
 Host: localhost
@@ -98,8 +94,6 @@ X-Forwarded-For: 127.0.0.1
 
 EOF
 
-}
-
 ###############################################################################
 
 sub http_xff {
--- a/scgi_body.t
+++ b/scgi_body.t
@@ -62,9 +62,6 @@ like(http_get('/'), qr/X-Body: /, 'scgi 
 like(http_get_length('/', ''), qr/X-Body: /, 'scgi empty body');
 like(http_get_length('/', 'foobar'), qr/X-Body: foobar/, 'scgi body');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.3.9');
-
 like(http(<<EOF), qr/X-Body: foobar/, 'scgi chunked');
 GET / HTTP/1.1
 Host: localhost
@@ -87,8 +84,6 @@ 0
 
 EOF
 
-}
-
 ###############################################################################
 
 sub http_get_length {
--- a/upstream.t
+++ b/upstream.t
@@ -78,8 +78,6 @@ is(many('/', 30), '8081: 15, 8082: 15', 
 is(many('/close', 30), '8081: 6, 8082: 24', 'failures');
 
 SKIP: {
-local $TODO = 'broken in 1.3.0';
-
 skip 'long test', 1 unless $ENV{TEST_NGINX_UNSAFE};
 
 # bug: failures counter is reset if first request in a second succeeds