This repository has been archived on 2026-10-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasonJatham 5c46b47937 chore(repo): move current KarlDNS source to Gitea
Preserve the GitHub history and the newer deployed source from ct_134_karldns. Exclude runtime data, credentials, AppleDouble files and local backup copies. Make Gitea the canonical source for documentation, package metadata and project links.
2026-10-28 08:47:52 +01:00

18 lines
635 B
Python

import pytest
from karldns.settings import _is_reserved_admin_path, _validate_launch_secrets
def test_reserved_admin_path_matches_exact_and_nested_public_routes() -> None:
assert _is_reserved_admin_path("/api")
assert _is_reserved_admin_path("/api/v1")
assert _is_reserved_admin_path("/logo.png")
assert _is_reserved_admin_path("/llms.txt")
assert not _is_reserved_admin_path("/ops")
assert not _is_reserved_admin_path("/apix")
def test_launch_secrets_require_strong_admin_password() -> None:
with pytest.raises(RuntimeError, match="DDNS_ADMIN_PASSWORD"):
_validate_launch_secrets("short", "")