Ignore:
Timestamp:
02/18/26 18:11:42 (29 hours ago)
Author:
Kris Deugau
Message:

/branches/cname-collision

Add new test domain and record checks in DNSTest.pm
Also tweak a critical bailout error message
See #72, #88

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cname-collision/t/DNSTest.pm

    r1011 r1041  
    6464
    6565  my ($dcount) = $dbh->selectrow_array("SELECT count(*) FROM domains WHERE NOT domain IN ".
    66         "('example.com','example.net','example.org','expiry1.test','expiry2.test','expiry3.test')");
     66        "('example.com','example.net','example.org','expiry1.test','expiry2.test','expiry3.test','cname-blocks1.test')");
    6767  BAIL_OUT("# DB looks like it may not be a test DB, found $dcount > 0 non-test domains!\n")
    6868        if $dcount > 0;
     
    7171  my ($rcount) = $dbh->selectrow_array(qq{SELECT count(*) FROM records WHERE NOT (
    7272        host like '%example.com' or host like '%example.net' or host like '%example.org' or
    73         host like '%expiry_.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'
    7475        )});
    7576  my $maxrecs = 0;
    76   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")
    7778        if $rcount > $maxrecs;
    7879  cmp_ok( $rcount, '<=', $maxrecs, "non-test record ($rcount): looks like a test DB" );
Note: See TracChangeset for help on using the changeset viewer.