Changeset 992 for branches/cname-collision
- Timestamp:
- 01/16/26 11:20:11 (8 days ago)
- Location:
- branches/cname-collision/t
- Files:
-
- 3 edited
-
cname.t (modified) (1 diff)
-
dns-unitbase.sql (modified) (5 diffs)
-
test-cname-timestamps.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/cname-collision/t/cname.t
r991 r992 296 296 } 297 297 }; 298 subtest 'expire after valid-after record' => sub { 299 $newname = 'expires-at4.expiry2.test'; 300 ($code, $msg) = $dnsdb->addRec('n', 'n', 5, \$newname, \$rectype, \$newval, 900, undef, 't', $expirystamp); 301 ok( $code eq 'WARN', "addRec() claimed success with warning" ); 302 if ($code eq 'WARN') { 303 ($rcount) = $dbh->selectrow_array("SELECT count(*) FROM records WHERE domain_id = 5 AND host = '$newname'"); 304 ok( $rcount == 2, " ... [$rcount] correct number of records for $newname" ); 305 like( $msg, qr/added with modified expiry time; conflicting valid-after record found/, " ... returned appropriate warning message" ); 306 my ($newstamp) = $dbh->selectrow_array("SELECT stamp FROM records WHERE domain_id = 5 AND host = '$newname' ". 307 "AND stampactive = 't' AND expires = 't'"); 308 my ($oldstamp) = $dbh->selectrow_array("SELECT stamp FROM records WHERE domain_id = 5 AND host = '$newname' ". 309 "AND stampactive = 't' AND expires = 'f'"); 310 ok( $newstamp eq $oldstamp, " ... coerced timestamp matches existing active-after timestamp" ); 311 } else { 312 print "not ok: $msg"; 313 } 314 }; 298 315 }; # add expiring CNAME 299 316 -
branches/cname-collision/t/dns-unitbase.sql
r988 r992 658 658 3 example.net 1 1 2025121800 D f ab 659 659 4 expiry1.test 1 1 2026011400 D t 660 5 expiry2.test 1 1 202601150 2D t660 5 expiry2.test 1 1 2026011503 D t 661 661 \. 662 662 … … 777 777 69 5 1 1 admin Initial User Added record 'expires-at2.expiry2.test TXT imma expire soon', TTL 5400, expires at 2026-01-15 18:00 2026-01-15 12:58:51.09629-05 0 0 778 778 70 5 1 1 admin Initial User Added record 'expires-at3.expiry2.test TXT active after pending expiry', TTL 5400, expires at 2026-01-15 18:00 2026-01-15 13:21:31.833257-05 0 0 779 71 5 1 1 admin Initial User Added record 'expires-at4.expiry2.test TXT active before pending expiry', TTL 5400, expires at 2026-01-15 18:00 2026-01-15 17:59:01.61806-05 0 0 779 780 \. 780 781 … … 784 785 -- 785 786 786 SELECT pg_catalog.setval('public.log_log_id_seq', 7 0, true);787 SELECT pg_catalog.setval('public.log_log_id_seq', 71, true); 787 788 788 789 … … 885 886 5 59 expires-at2.expiry2.test 16 imma expire soon 0 0 0 5400 \N 0 2026-01-15 18:00:00-05 t t \N 886 887 5 60 expires-at3.expiry2.test 16 active after pending expiry 0 0 0 5400 \N 0 2026-01-15 18:00:00-05 f t \N 888 5 61 expires-at4.expiry2.test 16 active before pending expiry 0 0 0 5400 \N 0 2026-01-15 18:00:00-05 f t \N 887 889 \. 888 890 … … 892 894 -- 893 895 894 SELECT pg_catalog.setval('public.records_record_id_seq', 6 0, true);896 SELECT pg_catalog.setval('public.records_record_id_seq', 61, true); 895 897 896 898 -
branches/cname-collision/t/test-cname-timestamps.sql
r988 r992 10 10 UPDATE records SET stamp = date_trunc('day', now() + interval '4 day') + '11:30' WHERE record_id = 59; 11 11 UPDATE records SET stamp = date_trunc('day', now() + interval '4 day') + '11:30' WHERE record_id = 60; 12 UPDATE records SET stamp = date_trunc('day', now() + interval '2 day') + '11:30' WHERE record_id = 61;
Note:
See TracChangeset
for help on using the changeset viewer.
![[ DNS Administrator ]](/fx/dnsadmin-logo.png)