A Configuration Management Database defined entirely as a test suite
Traditional software ships code. This project ships tests.
The test suites in this repository define what a Configuration Management Database must do — its API surface, data model, behavioral invariants, performance baselines, and security requirements. Any implementation that passes the tests is a valid CMDB instance. The implementation itself is disposable; the specification is the product.
A test suite is a better specification than documentation because:
minimal profile. Need full compliance? Use enterprise. Need discovery but not governance? Make a custom profile.┌──────────────────────────────────────────────┐
│ specs/ │
│ OpenAPI 3.1 + JSON Schema │
│ (the API contract — what endpoints exist) │
├──────────────────────────────────────────────┤
│ suites/ │
│ pytest test suites │
│ (the behavioral spec — how they must work) │
├──────────────────────────────────────────────┤
│ harness/ │
│ HTTP client + fixtures + strategies │
│ (the test infrastructure) │
├──────────────────────────────────────────────┤
│ profiles/ │
│ Compliance tiers │
│ (which suites to run) │
├──────────────────────────────────────────────┤
│ generator/ │
│ AI-driven code generation │
│ (turns the spec into a running server) │
└──────────────────────────────────────────────┘
The specs/ directory contains the API contract in two formats:
The suites/ directory contains pytest modules organized by capability. Each module’s docstring lists the invariants it verifies. Tests use three complementary styles:
@given tests that verify invariants hold for any valid input. Catches edge cases that example tests miss.@pytest.mark.parametrize over injection payloads, invalid inputs, etc.The test infrastructure that makes all suites implementation-agnostic:
harness/client.py — The only code that talks HTTP. Wraps httpx with typed methods and typed exceptions. Every test goes through this client.harness/factories/ — Hypothesis strategies for generating valid CI inputs, relationship types, attribute values.conftest.py — Factory fixtures (make_ci, make_relationship) that auto-cleanup. Hypothesis profile registration.Profiles select which suites constitute a compliance tier. They’re standard pytest .ini files:
[pytest]
testpaths = suites/core suites/discovery suites/audit suites/graph
addopts = --tb=short -q
The generator is optional tooling that turns the spec into a running server. It’s not the core product — you can ignore it entirely and validate a hand-written CMDB against the tests.
The entire specification connects to any implementation through a single environment variable:
CMDB_BASE_URL=http://localhost:8080
This is deliberate. The test suite knows nothing about:
It only knows the URL. This means the same tests validate a FastAPI prototype on localhost and a production Kubernetes deployment behind a load balancer.
User / Generator
│
│ CMDB_BASE_URL
▼
harness/client.py ──HTTP──▶ Any CMDB Implementation
│ │
│ │
conftest.py fixtures ▼
│ Database (any)
▼
suites/test_*.py
│
▼
pytest exit code (0 = compliant, 1 = non-compliant)
The spec grows by adding tests:
suites/harness/client.py, new response model if needed.ini in profiles/The spec never grows by adding implementation code. If you find yourself writing business logic in the harness, something has gone wrong.