Ignore:
Timestamp:
01/08/26 13:34:11 (13 days ago)
Author:
Kris Deugau
Message:

/branches/cname-collision

Test for collision with yet-to-expire record. Technically overkill as it
falls through to the non-expiring-record case but future refinements may
make this relevant.
See #72, #88

File:
1 edited

Legend:

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

    r968 r969  
    214214      }
    215215    };
     216# this test arguably overkill, subsumed by earlier test for substantially the same thing
     217    subtest '  - collision with soon to expire record' => sub {
     218      $newname = 'expired2.expiry1.test';
     219      ($code, $msg) = $dnsdb->addRec('n', 'n', 4, \$newname, \$rectype, \$newval, 900);
     220      ok( $code eq 'FAIL', "addRec() claimed failure" );
     221      if ($code eq 'FAIL') {
     222        ($rcount) = $dbh->selectrow_array("SELECT count(*) FROM records WHERE domain_id = 4 AND host = '$newname' AND type <> 5 AND stampactive = 't'");
     223        ok( $rcount, '==', 1, " ... [$rcount] record(s) with $newname already exist" );
     224# somewhat less overkill if we try to target a unique return based around the expiry bit
     225        like( $msg, qr/One or more non-CNAME records/, " ... returned matching error" );
     226      }
     227    };
    216228  };
    217229
Note: See TracChangeset for help on using the changeset viewer.