Skip to content

Add coverage for the aliased-owner delete guard when an owner yields no records #77

Description

@aflor024

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions