Changeset 994 for branches/cname-collision/t/cname.t
- Timestamp:
- 01/16/26 13:22:15 (3 weeks ago)
- File:
-
- 1 edited
-
branches/cname-collision/t/cname.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/cname-collision/t/cname.t
r993 r994 318 318 } 319 319 }; 320 subtest 'collision with expired record' => sub { 321 $newname = 'expires-at5.expiry2.test'; 322 ($code, $msg) = $dnsdb->addRec('n', 'n', 5, \$newname, \$rectype, \$newval, 900, undef, 't', $expirystamp); 323 ok( $code eq 'OK', "addRec() claimed success" ); 324 if ($code eq 'OK') { 325 # crosscheck in the DB 326 ($rcount) = $dbh->selectrow_array("SELECT count(*) FROM records WHERE domain_id = 5 AND host = '$newname'"); 327 ok( $rcount == 2, " ... [$rcount] correct number of records for $newname" ); 328 my ($newstamp) = $dbh->selectrow_array("SELECT extract(epoch from stamp) FROM records WHERE domain_id = 5 AND host = '$newname' ". 329 "AND stampactive = 't' AND expires = 't' AND stamp >= now()"); 330 my ($oldstamp) = $dbh->selectrow_array("SELECT extract(epoch from stamp) FROM records WHERE domain_id = 5 AND host = '$newname' ". 331 "AND stampactive = 't' AND expires = 't' AND stamp <= now()"); 332 ok( $newstamp > $oldstamp, " ... added record expires after existing, already-expired record" ); 333 } else { 334 print "not ok: $msg"; 335 } 336 }; 320 337 }; # add expiring CNAME 321 338
Note:
See TracChangeset
for help on using the changeset viewer.
![[ DNS Administrator ]](/fx/dnsadmin-logo.png)