mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-16 08:25:14 +02:00
feat(scan): enforce table scope at fetch boundary
This commit is contained in:
parent
a698389bc9
commit
5b8292cacd
19 changed files with 208 additions and 160 deletions
|
|
@ -114,6 +114,7 @@ def test_database_introspect_endpoint_returns_snapshot() -> None:
|
|||
"driver": "postgres",
|
||||
"url": "postgresql://readonly@example.test/warehouse",
|
||||
"schemas": ["public"],
|
||||
"table_scope": [{"db": "public", "name": "orders"}],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -121,6 +122,8 @@ def test_database_introspect_endpoint_returns_snapshot() -> None:
|
|||
assert response.json()["connection_id"] == "warehouse"
|
||||
assert response.json()["tables"][0]["name"] == "orders"
|
||||
assert calls[0].connection_id == "warehouse"
|
||||
assert calls[0].table_scope[0].db == "public"
|
||||
assert calls[0].table_scope[0].name == "orders"
|
||||
|
||||
|
||||
def test_database_introspect_endpoint_maps_value_error_to_400() -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue