Changeset 1051 for trunk/t/DNSTest.pm
- Timestamp:
- 03/06/26 11:33:19 (3 days ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
t/DNSTest.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/cname-collision (added) merged: 936-942,949-956,958-960,962-964,967-970,972-984,986-1001,1003-1006,1008-1031,1038-1046
- Property svn:mergeinfo changed
-
trunk/t/DNSTest.pm
r985 r1051 5 5 ## 6 6 # $Id$ 7 # Copyright 2025 Kris Deugau <kdeugau@deepnet.cx>7 # Copyright 2025,2026 Kris Deugau <kdeugau@deepnet.cx> 8 8 # 9 9 # This program is free software: you can redistribute it and/or modify … … 48 48 dbuser => 'dnstest', 49 49 dbpass => 'dnstestpwd', 50 51 # This exercises more branches of the CNAME collision check with more fine-grained results. 52 coerce_cname_timestamp => 'adjust', 50 53 ); 51 54 ok( defined $dnsdb ); … … 61 64 62 65 my ($dcount) = $dbh->selectrow_array("SELECT count(*) FROM domains WHERE NOT domain IN ". 63 "('example.com','example.net','example.org','expiry1.test','expiry2.test' )");66 "('example.com','example.net','example.org','expiry1.test','expiry2.test','expiry3.test','cname-blocks1.test')"); 64 67 BAIL_OUT("# DB looks like it may not be a test DB, found $dcount > 0 non-test domains!\n") 65 68 if $dcount > 0; … … 68 71 my ($rcount) = $dbh->selectrow_array(qq{SELECT count(*) FROM records WHERE NOT ( 69 72 host like '%example.com' or host like '%example.net' or host like '%example.org' or 70 host like '%expiry1.test' or host like '%expiry2.test' or inetlazy(val) << '192.168.2.0/27' 73 host like '%expiry_.test' or host like '%cname-blocks_.test' or 74 inetlazy(val) << '192.168.2.0/27' 71 75 )}); 72 76 my $maxrecs = 0; 73 BAIL_OUT("# DB looks like it may not be a test DB, found $rcount > $maxrecs records!\n")77 BAIL_OUT("# DB looks like it may not be a test DB, found $rcount > $maxrecs non-test records!\n") 74 78 if $rcount > $maxrecs; 75 79 cmp_ok( $rcount, '<=', $maxrecs, "non-test record ($rcount): looks like a test DB" ); … … 83 87 my $reload = qx( psql -h $dnsdb->{dbhost} -U $dnsdb->{dbuser} $dnsdb->{dbname} 2>&1 < t/dns-unitbase.sql ); 84 88 diag( $reload ) if $debug; 89 # Set timestamps to a sliding window 90 my $stampwindow = qx( psql -h $dnsdb->{dbhost} -U $dnsdb->{dbuser} $dnsdb->{dbname} 2>&1 < t/test-cname-timestamps.sql ); 91 diag( $stampwindow ) if $debug; 85 92 undef $ENV{PGPASSWORD}; 86 93 } # new()
Note:
See TracChangeset
for help on using the changeset viewer.
![[ DNS Administrator ]](/fx/dnsadmin-logo.png)