Changeset 1021


Ignore:
Timestamp:
02/05/26 13:10:37 (3 days ago)
Author:
Kris Deugau
Message:

/branches/cname-collision

Test with updating to a CNAME that expires:
Add test for collision with existing pending-expiry record
See #72, #88

File:
1 edited

Legend:

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

    r1020 r1021  
    447447      }
    448448    };
     449    subtest 'collision with expiring record' => sub {
     450      $newname = 'expires2a.expiry3.test';
     451      ($code, $msg) = $dnsdb->updateRec('n', 'n', 90, 6, \$newname, \$rectype, \$newval, 900, undef, 't', $expirystamp);
     452      ok( $code eq 'FAIL', "updateRec() claimed failure");
     453      if ($code eq 'FAIL') {
     454        ($rcount) = $dbh->selectrow_array("SELECT count(*) FROM records WHERE domain_id = 6 AND host = '$newname' AND type <> 5");
     455        ok( $rcount == 1, " ... [$rcount] record(s) with $newname already exist" );
     456        like( $msg, qr/One or more non-CNAME records/, " ... returned matching error" );
     457      }
     458    };
    449459  };
    450460
Note: See TracChangeset for help on using the changeset viewer.