What needs to happen
The aliased-owner delete guard added in #75 protects two code paths. Only one of them has test coverage. The other needs it.
Why this matters
The untested path is: an owning DNSRecordSet exists, BuildOwnerRRSet produces no usable records, and a different spelling of the same owner name still claims the RRset. The guard should skip the delete there, because the other spelling still wants the record.
That is the branch where over-blocking would hide, and over-blocking is the failure mode of this guard — a record that should have been removed stays in PowerDNS and keeps resolving, which is worse than the bug the guard fixes because nothing surfaces it.
The owner == nil path has three tests (respelled name in both queue orderings, apex spelling, genuine removal). This one has none.
Desired outcome
A test asserting the delete is skipped when an owner yields no records but another spelling of the name still claims the RRset.
A companion test asserting an empty payload with no aliased owner still deletes, so the behaviour TestReconcile_OwnerWithNoRecords_DeletesRRSet covers stays pinned and the guard can't silently start blocking legitimate cleanup.
Related
What needs to happen
The aliased-owner delete guard added in #75 protects two code paths. Only one of them has test coverage. The other needs it.
Why this matters
The untested path is: an owning DNSRecordSet exists,
BuildOwnerRRSetproduces no usable records, and a different spelling of the same owner name still claims the RRset. The guard should skip the delete there, because the other spelling still wants the record.That is the branch where over-blocking would hide, and over-blocking is the failure mode of this guard — a record that should have been removed stays in PowerDNS and keeps resolving, which is worse than the bug the guard fixes because nothing surfaces it.
The
owner == nilpath has three tests (respelled name in both queue orderings, apex spelling, genuine removal). This one has none.Desired outcome
A test asserting the delete is skipped when an owner yields no records but another spelling of the name still claims the RRset.
A companion test asserting an empty payload with no aliased owner still deletes, so the behaviour
TestReconcile_OwnerWithNoRecords_DeletesRRSetcovers stays pinned and the guard can't silently start blocking legitimate cleanup.Related