Opened 2 months ago

Last modified 3 days ago

#88 new task

Build test suite

Reported by: Kris Deugau Owned by:
Priority: major Milestone:
Version: Keywords:
Cc:

Description


Change History (63)

comment:1 by Kris Deugau, 2 months ago

In 943:

/trunk

Finally start building out a test suite rather than relying on hand-testing.
See #88

comment:2 by Kris Deugau, 2 months ago

In 944:

/trunk/t

Add calls to wipe and reload a consistent minimal DB for testing
Add SQL files to drop and reload tables
See #88

comment:3 by Kris Deugau, 2 months ago

In 945:

/trunk/t

Tweak test calls checking the DB
See #88

comment:4 by Kris Deugau, 2 months ago

In 946:

/trunk/t

Set proper module stucture so the DNSDB object can be exported to the actual test files
See #88

comment:5 by Kris Deugau, 2 months ago

In 947:

/trunk/t

Rejig psql drop/reload to better suppress output unless debugging the test
framework itself; it's too noisy for regular use. Neither diag or note
seem to actually suppress it.
See #88

comment:6 by Kris Deugau, 2 months ago

In 948:

/trunk/t

Patch up some fixes misplaced in patch shuffling
See #88

comment:7 by Kris Deugau, 2 months ago

In 950:

/branches/cname-collision

Start adding actual tests. See #88.

First chunk, tests for CNAME collision checks. See #72.

comment:8 by Kris Deugau, 2 months ago

In 951:

/branches/cname-collision

Add CNAME record-add tests for reverse zones. See #88, #72

comment:9 by Kris Deugau, 2 months ago

In 952:

/branches/cname-collision

Add add-duplicate-CNAME test that got missed somehow when shuffling patches
Wrap domain and reverse zone groups of tests in their own blocks
See #88, #72

comment:10 by Kris Deugau, 2 months ago

In 953:

/branches/cname-collision

Add domain record update tests
See #88, #72

comment:11 by Kris Deugau, 8 weeks ago

In 954:

/branches/cname-collision

Fix another patch-shuffling oops; accidentally duplicated a test instead
of copying in the appropriate variantion.
See #72, #88

comment:12 by Kris Deugau, 8 weeks ago

In 955:

/branches/cname-collision

Rename some subtests for consistency
Fix trivial whitespace oops
See #72, #88

comment:13 by Kris Deugau, 8 weeks ago

In 956:

/branches/cname-collision

More test name fiddling for consistency
See #72, #88

comment:14 by Kris Deugau, 8 weeks ago

In 957:

/trunk

Add minimal call to run tests with "make test". See #88.

comment:15 by Kris Deugau, 8 weeks ago

In 958:

/branches/cname-collision

Merge a minor bit of test framework stuff from /trunk
See #88, #72

comment:16 by Kris Deugau, 8 weeks ago

In 961:

/trunk

Polish up a little boilerplate in t/DNSTest.pm for easier debugging of tests
See #88

comment:17 by Kris Deugau, 7 weeks ago

In 962:

/branches/cname-collision

File down a rough edge by way of proper new() boilerplate
File down another rough edge by initializing a module debug variable
Recordkeeping merge from /trunk
See #88

comment:18 by Kris Deugau, 7 weeks ago

In 964:

/branches/cname-collision

Tests for CNAME updates in reverse zones
See #72, #88

comment:19 by Kris Deugau, 7 weeks ago

In 965:

/trunk/t

Replace example.dev with expiry1.test in test DB, since apparently "example"

is NOT reserved in all TLDs

Add and tweak a couple more test DB records
See #88

comment:20 by Kris Deugau, 7 weeks ago

In 968:

/branches/cname-collision

Exclude expired records from collision failures
See #72, #88

comment:21 by Kris Deugau, 7 weeks ago

In 969:

/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

comment:22 by Kris Deugau, 7 weeks ago

In 970:

/branches/cname-collision

Compact the timestamp check from r968 since it's looking like further
timestamp-related checks will need to go elsewhere anyway, and copy it
into the second section.
See #72, #88

comment:23 by Kris Deugau, 7 weeks ago

In 971:

/trunk

Tweak DB-safety check in test setup module
See #88

comment:24 by Kris Deugau, 7 weeks ago

In 976:

/branches/cname-collision

Add a set of test records with various expiry/valid-after settings for
testing CNAME collisions
Add a file of SQL UPDATEs and a call in the test setup module to normalize
the actual tested timestamps to a sliding window so that the base SQL
reference doesn't need to be updated on an ongoing basis for the tests to
work correctly
See #72, #88

comment:25 by Kris Deugau, 6 weeks ago

In 982:

/branches/cname-collision

Add test for new non-timestamped CNAME colliding with a record with a
future valid-after stamp
See #72, #88

comment:26 by Kris Deugau, 6 weeks ago

In 984:

/branches/cname-collision

Added specific test for CNAME colliding with a record that has a valid-after
timestamp in the past.

  • additional test record
  • adjusted timestamp-retrieval SQL
  • extend logic tree for this case

See #72, #88

comment:27 by Kris Deugau, 6 weeks ago

In 985:

/trunk/t

Revise test module checks for non-test data; check for presence of
anything outside known test domains/records instead of blindly counting.
See #88

comment:28 by Kris Deugau, 6 weeks ago

In 987:

/branches/cname-collision

Add test subgroup for expiring CNAME. First two tests are arguably retries
of earlier tests from domain group, included for completeness.
See #72, #88

comment:29 by Kris Deugau, 6 weeks ago

In 989:

/branches/cname-collision

Add test for new CNAME with expiry before pending valid-after
Add missing 'use Date::Parse' so user input can be parsed for timestamp comparisons
See #72, #88

comment:30 by Kris Deugau, 6 weeks ago

In 991:

/branches/cname-collision

Rename/relabel some tests for consistency
See #88

comment:31 by Kris Deugau, 6 weeks ago

In 992:

/branches/cname-collision

Add test and supporting record for new CNAME with expiry after an existing
record's valid-after timestamp
See #72, #88

comment:32 by Kris Deugau, 6 weeks ago

In 994:

/branches/cname-collision

Add test and target record for checking adding an expiring CNAME after a
same-name record has expired.
See #72, #88

comment:33 by Kris Deugau, 4 weeks ago

In 1001:

/branches/cname-collision

Revise test for adding expiring CNAME when an existing expired CNAME already
exists to match updated logic tree and truth table.
See #72, #88

comment:34 by Kris Deugau, 4 weeks ago

In 1004:

/branches/cname-collision

Start adding test group for adding a CNAME with a valid-after timestamp

  • collision with existing non-timestamped record

See #72, #88

comment:35 by Kris Deugau, 4 weeks ago

In 1005:

/branches/cname-collision

Test for correct handling and timestamp adjustment to new valid-after
overlapping an existing pending-expiry
See #72, #88

comment:36 by Kris Deugau, 4 weeks ago

In 1006:

/branches/cname-collision

Test for new valid-after CNAME active after existing valid-after with the same name
See #72, #88

comment:37 by Kris Deugau, 4 weeks ago

In 1008:

/branches/cname-collision

Fix date math to properly cross month boundaries generating the new/updated
record's timestamp
See #88

comment:38 by Kris Deugau, 4 weeks ago

In 1009:

/branches/cname-collision

Test for new CNAME with valid-after timestamp before an existing
valid-after record with the same name
See #72, #88

comment:39 by Kris Deugau, 4 weeks ago

In 1010:

/branches/cname-collision

Test for new CNAME with valid-after timestamp after existing record expires
See #72, #88

comment:40 by Kris Deugau, 3 weeks ago

In 1012:

/branches/cname-collision

Fix up test checking adjustment of valid-after timestamp when the requested
time is before an existing valid-after

  • Record count made more accurate by counting all records with the test name
  • Somehow missed checking the timestamp values in r1005

See #72, #88

comment:41 by Kris Deugau, 3 weeks ago

In 1014:

/branches/cname-collision

Add another test zone and records for update-to-CNAME test cases
Add relevant timestamp updates for the new test suite records
See #72, #88

comment:42 by Kris Deugau, 3 weeks ago

In 1015:

/branches/cname-collision

Start adding tests calling updateRec() with new non-timestamp CNAME data
See #72, #88

comment:43 by Kris Deugau, 3 weeks ago

In 1016:

/branches/cname-collision

Add the other three tests for "update record to non-timestamp CNAME
colliding with variously timestamped existing record"
See #72, #88

comment:44 by Kris Deugau, 3 weeks ago

In 1017:

/branches/cname-collision

Add record group for testing update to CNAME with expiry
See #72, #88

comment:45 by Kris Deugau, 3 weeks ago

In 1020:

/branches/cname-collision

Add test group for updating a record to a CNAME with an expiry
Add arguably redundant test checking for collision with nontimestamped record
See #72, #88

comment:46 by Kris Deugau, 3 weeks ago

In 1021:

/branches/cname-collision

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

comment:47 by Kris Deugau, 3 weeks ago

In 1022:

/branches/cname-collision

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

comment:48 by Kris Deugau, 3 weeks ago

In 1023:

/branches/cname-collision

Test with updating to a CNAME that expires:
Add test for overlap with pending valid-after record
See #72, #88

comment:49 by Kris Deugau, 3 weeks ago

In 1024:

/branches/cname-collision

Test with updating to a CNAME that expires:
Add test for expiry after active valid-after record
See #72, #88

comment:50 by Kris Deugau, 3 weeks ago

In 1025:

/branches/cname-collision

Test with updating to a CNAME that expires:
Add test for expiry before pending valid-after record. Note this probes the
(corrected) revised handling in r1019.

See #72, #88

comment:51 by Kris Deugau, 3 weeks ago

In 1026:

/branches/cname-collision

Add test records and timestamp window adjustments for what should be the
last group of records for testing CNAME collisions
See #72, #88

comment:52 by Kris Deugau, 3 weeks ago

In 1027:

/branches/cname-collision

Add test group for updating a record to a valid-after CNAME
Add arguably redundant test checking for collision with nontimestamped record
See #72, #88

comment:53 by Kris Deugau, 3 weeks ago

In 1028:

/branches/cname-collision

Test with updating to a valid-after CNAME:
Add test for collision with existing pending-expiry record with timestamp
before existing expiry
See #72, #88

comment:54 by Kris Deugau, 3 weeks ago

In 1029:

/branches/cname-collision

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

comment:55 by Kris Deugau, 3 weeks ago

In 1030:

/branches/cname-collision

Test with updating to a valid-after CNAME:
Add test for collision with existing valid-after record, new timestamp before existing
See #72, #88

comment:56 by Kris Deugau, 3 weeks ago

In 1031:

/branches/cname-collision

Test with updating to a valid-after CNAME:
Add test for collision with existing valid-after record, new timestamp after existing
See #72, #88

comment:57 by Kris Deugau, 5 days ago

In 1040:

/branches/cname-collision

Last-minute-ish addition of another block of tests to make sure non-CNAMEs
collide with CNAMEs, but continue to not collide with each other
First, the new domain and records
See #72, #88

comment:58 by Kris Deugau, 5 days ago

In 1041:

/branches/cname-collision

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

comment:59 by Kris Deugau, 5 days ago

In 1042:

/branches/cname-collision

First block of actual tests - add nonexpiring non-CNAME
See #72, #88

comment:60 by Kris Deugau, 3 days ago

In 1043:

/branches/cname-collision

Remove some excessive docucomments from test file, refine/add a few others
Clean up test calls for consistency and improved clarity on fail
See #88

comment:61 by Kris Deugau, 3 days ago

In 1044:

/branches/cname-collision

Complete a missed conversion from ok() to cmp_ok()
A couple more docucomments
See #88

comment:62 by Kris Deugau, 3 days ago

In 1045:

/branches/cname-collision

Add a second non-CNAME validating non-collision with non-CNAMEs
Add the block of tests checking collisions between a new expiring record
and various existing CNAMEs
See #72, #88

comment:63 by Kris Deugau, 3 days ago

In 1046:

/branches/cname-collision

Revised timestamp adjustments on test records
See #88

Note: See TracTickets for help on using tickets.