test: add API endpoint test suite and enable the CI test job#50
Merged
gordonmurray merged 1 commit intoJun 10, 2026
Merged
Conversation
The CI test job only printed debug info because TestClient broke when an unpinned httpx (0.28+) removed the app= kwarg that the starlette version pinned by fastapi 0.104 still passes. Pinning httpx<0.28 fixes that, so the job now runs a real pytest suite. The suite covers all six endpoints: health and compat flags, dataset listing, schema and column metadata, row pagination and column filtering, value serialization (binary, nulls, vectors, CLIP detection), vector preview stats, and the informational-row fallback for corrupted datasets. Fixtures build sample tables in a tmpdir with whatever lancedb version is installed, so the same tests run against every constraints file. Lance format v1 stores a null list as an empty list, so the affected tests detect at runtime which behavior the installed version has. Also re-raise HTTPException in /rows and /vector/preview so the 400s for unknown columns reach the client instead of being masked as 500s. Fixes lance-format#28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CI test job has been printing debug output since the endpoint tests were commented out. The blocker turned out to be a dependency clash: the job installs unpinned httpx, and httpx 0.28 removed the
app=kwarg that the starlette version pinned by fastapi 0.104 still passes to TestClient. Pinninghttpx<0.28fixes that, so the job now runs a real pytest suite.backend/tests/using pytest and FastAPI TestClient: health and compat flags, dataset listing, schema and column metadata, pagination and column filtering, value serialization (nulls, binary, vectors, CLIP detection), vector preview stats, and the informational-row fallback for corrupted datasets./rowsand/vector/previewre-raise HTTPException, so the 400 for unknown column names reaches the client instead of being turned into a generic 500 by the catch-all handler.Test plan
Fixes #28