Skip to content

test(api): cover /v1/status and /v1/jobs read endpoints - #174

Merged
zc277584121 merged 1 commit into
zilliztech:mainfrom
zc277584121:test/api-status-jobs-regression
Jul 13, 2026
Merged

zc277584121 merged 1 commit into
zilliztech:mainfrom
zc277584121:test/api-status-jobs-regression

Conversation

@zc277584121

Copy link
Copy Markdown
Collaborator

What

Adds tests/test_api_status_jobs.py — a small regression guard driving the three metadata-only read endpoints through a real TestClient lifespan:

  • GET /v1/status → 200 {"connectors": [], "jobs": {}}
  • GET /v1/jobs → 200 []
  • GET /v1/jobs/{missing} → 404 not_found

Why

These endpoints go through eng().infra.meta and had no test coverage. When the InfraStack refactor (#164) dropped the Engine.meta forwarding property, the call sites in api/app.py kept reading the removed attribute, so all three 500'd with 'Engine' object has no attribute 'meta' — and the break shipped in 0.4.5 without any test noticing. #170 fixed the call sites; this closes the coverage gap so the whole "endpoint wired to a stale handle" class stays caught.

Verified the guard is real: reverting api/app.py back to eng().meta turns all three tests red with the exact AttributeError; on current main they pass (3 passed).

These metadata-only endpoints go through eng().infra.meta and had no
coverage, so the InfraStack refactor that dropped the Engine.meta
forwarding property broke all three (500 "'Engine' object has no
attribute 'meta'") without any test noticing; zilliztech#170 fixed the call sites.
Drive them through a real TestClient lifespan against the tmp SQLite +
Milvus Lite so the "endpoint wired to a stale handle" regression class
stays caught.
@zc277584121
zc277584121 merged commit 465cb2f into zilliztech:main Jul 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant