Archived
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.
This commit is contained in:
1 parent
4ecc8eb874
commit
5c46b47937
21 files changed
+1301
-593
No files matched your search
@@ -12,6 +12,32 @@ def _path(url: str) -> str:
|
||||
return parsed.path
|
||||
|
||||
|
||||
def test_llms_txt_documents_public_api_without_creating_accounts(tmp_path: Path) -> None:
|
||||
app = make_app(
|
||||
DdnsSettings(
|
||||
database_path=tmp_path / "ddns.sqlite3",
|
||||
admin_password="private-admin-password",
|
||||
public_base_url="https://dns.example.net",
|
||||
hostname_suffix="dns.example.net",
|
||||
)
|
||||
)
|
||||
with TestClient(app) as client:
|
||||
response = client.get("/llms.txt")
|
||||
assert response.status_code == 200
|
||||
assert response.headers["content-type"].startswith("text/plain")
|
||||
assert response.text.startswith("# KarlDNS\n\n> ")
|
||||
assert "https://dns.example.net/openapi.json" in response.text
|
||||
assert "private-admin-password" not in response.text
|
||||
assert "/api/v1/admin" not in response.text
|
||||
assert "## Optional\n" in response.text
|
||||
assert 'rel="describedby" href="/llms.txt"' in client.get("/").text
|
||||
for path, operations in client.get("/openapi.json").json()["paths"].items():
|
||||
assert path in response.text
|
||||
for method in operations:
|
||||
assert method.upper() in response.text
|
||||
assert app.state.store.count_accounts() == 0
|
||||
|
||||
|
||||
def test_custom_api_docs_include_only_current_api_surfaces(tmp_path: Path) -> None:
|
||||
app = make_app(
|
||||
DdnsSettings(
|
||||
|
||||
Reference in new issue
Block a user