changeset 364:ec3284ebe53b

Tests: removed excessive resolver test. This test unnecessarily insists on implementation details.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 23 Dec 2013 20:41:19 +0400
parents 98f3a8568b0c
children 81fed52bfca5
files http_resolver.t
diffstat 1 files changed, 1 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/http_resolver.t
+++ b/http_resolver.t
@@ -80,7 +80,7 @@ EOF
 $t->run_daemon(\&dns_daemon, 8081, $t);
 $t->run_daemon(\&dns_daemon, 8082, $t);
 
-$t->run()->plan(31);
+$t->run()->plan(30);
 
 $t->waitforfile($t->testdir . '/8081');
 $t->waitforfile($t->testdir . '/8082');
@@ -207,13 +207,6 @@ like(http_host_header('ttl.example.net',
 TODO: {
 local $TODO = 'not yet';
 
-# Ensure that resolver respects expired A in CNAME + A combined response.
-# When ttl in A is expired, only the canonical name should be queried.
-# Catch this by returning SERVFAIL on the 2nd and subsequent queries for
-# original name.
-
-http_host_header('cname_a_ttl.example.net', '/');
-
 # Ensure that resolver respects expired CNAME in CNAME + A combined response.
 # When ttl in CNAME is expired, the answer should not be served from cache.
 # Catch this by returning SERVFAIL on the 2nd and subsequent queries.
@@ -222,8 +215,6 @@ http_host_header('cname_a_ttl2.example.n
 
 sleep 2;
 
-like(http_host_header('cname_a_ttl.example.net', '/'), qr/200 OK/,
-	'CNAME + A with expired A ttl');
 like(http_host_header('cname_a_ttl2.example.net', '/'), qr/502 Bad/,
 	'CNAME + A with expired CNAME ttl');
 
@@ -353,18 +344,6 @@ sub reply_handler {
 				4, split(/\./, '127.0.0.1'));
 		}
 
-	} elsif ($name eq 'cname_a_ttl.example.net') {
-		push @rdata, pack("n3N nCa17n", 0xc00c, CNAME, IN, $ttl,
-			20, 17, 'cname_a_ttl_alias', 0xc018);
-
-		if ($type == A) {
-			if (++$state->{cttlcnt} >= 2) {
-			        $rcode = SERVFAIL;
-			}
-			push @rdata, pack('n3N nC4', 0xc035, A, IN, 1,
-				4, split(/\./, '127.0.0.1'));
-		}
-
 	} elsif ($name eq 'cname_a_ttl2.example.net' && $type == A) {
 		push @rdata, pack("n3N nCa18n", 0xc00c, CNAME, IN, 1,
 			21, 18, 'cname_a_ttl2_alias', 0xc019);