Refactor UI assets and harden quality checks

This commit is contained in:
StasonJatham committed 2026-06-17 23:18:00 +02:00
1 parent 23ab466c52
commit 4ecc8eb874
62 files changed
+3314 -3206

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
from karldns.store.records import RecordUpdateInput, UpdateEventInput, _planned_record_update
def test_planned_record_update_preserves_disabled_ip_versions() -> None:
plan = _planned_record_update(
RecordUpdateInput(
hostname="home.example.net",
ipv4="203.0.113.10",
ipv6=None,
update_ipv4=True,
update_ipv6=False,
),
current_ipv4="198.51.100.4",
current_ipv6="2001:db8::4",
existing=True,
)
assert plan.ipv4 == "203.0.113.10"
assert plan.ipv6 == "2001:db8::4"
assert plan.changed is True
def test_update_event_input_preserves_event_fields() -> None:
event = UpdateEventInput(
hostname="home.example.net",
ipv4="203.0.113.10",
ipv6=None,
status="updated",
detail="ok",
source_ip="198.51.100.1",
)
assert event.hostname == "home.example.net"
assert event.ipv4 == "203.0.113.10"
assert event.source_ip == "198.51.100.1"