Files
Sergey Antropoff 777926487b Add a stateful Proxmox API console and broad handler coverage beyond the
initial QEMU slice, backed by imported contracts for majors 6–9.
- Implement durable handlers for access/auth, cluster, LXC, storage, HA,
  firewall, Ceph, SDN, ACME, notifications, pools, mapping, and node ops
- Serve an interactive Web UI with catalog browsing, demo seed controls,
  and OpenAPI/help surfaces
- Bundle PVE 6.4-15, 7.4-16, and 8.4.5 contract revisions alongside 9.2.3
- Support in-memory runtime contract Apply (POST /ui/api/contract/apply)
  so /version and /api2 routes follow the selected major until restart
- Expand seed profiles (including demo-cluster), migrations 007–008, TLS
  gateway config, Compose/Makefile tooling, and compatibility evidence
- Tighten .gitignore for macOS, hidden directories (.*/), and local secrets
2026-07-16 01:08:01 +03:00

26 lines
1.1 KiB
Python

"""OpenAPI tag categorization tests."""
from app.api.openapi import contract_openapi_tag, contract_openapi_tags, openapi_tag_metadata
def test_contract_openapi_tag_groups_by_domain() -> None:
assert contract_openapi_tag("/version") == "Core"
assert contract_openapi_tag("/access/ticket") == "Access"
assert contract_openapi_tag("/nodes/{node}/qemu/{vmid}/config") == "Nodes · QEMU"
assert contract_openapi_tag("/nodes/{node}/lxc/{vmid}/config") == "Nodes · LXC"
assert contract_openapi_tag("/nodes/{node}/ceph/osd") == "Nodes · Ceph"
assert contract_openapi_tag("/cluster/ha/resources") == "Cluster · HA"
assert contract_openapi_tag("/pools") == "Pools"
def test_contract_openapi_tags_include_renderer() -> None:
assert contract_openapi_tags("/version", "json") == ["Core", "API2 JSON"]
assert contract_openapi_tags("/version", "extjs") == ["Core", "API2 ExtJS"]
def test_openapi_tag_metadata_is_deterministic() -> None:
names = [entry["name"] for entry in openapi_tag_metadata()]
assert names == sorted(names)
assert "Nodes · QEMU" in names
assert "Simulator" in names