Initial commit: stateful OpenStack API laboratory simulator.
Ship Keystone auth, multi-service handlers (Yoga→Dalmatian), Compose/Helm packaging, API contract packs, and pytest/Pulumi coverage labs.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
"""OpenStack catalog helper tests."""
|
||||
|
||||
from app.openstack.catalog import build_catalog, public_base
|
||||
|
||||
|
||||
def test_public_base() -> None:
|
||||
assert public_base("localhost", 5000) == "http://localhost:5000"
|
||||
|
||||
|
||||
def test_build_catalog_includes_core_services() -> None:
|
||||
catalog = build_catalog("127.0.0.1")
|
||||
types = {item["type"] for item in catalog}
|
||||
assert {"identity", "compute", "network", "image", "volumev3", "placement"} <= types
|
||||
nova = next(item for item in catalog if item["type"] == "compute")
|
||||
assert nova["endpoints"][0]["url"].endswith(":8774/v2.1")
|
||||
Reference in New Issue
Block a user