mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-06 22:12:12 +02:00
test: rename SearchSpace -> Workspace across tests + fixtures (Phase 2 Wave F)
Apply the same rename to surfsense_backend/tests: workspace_id fields/vars, Workspace* classes/schemas, table name searchspaces -> workspaces in raw SQL, and the API URL spellings -> /workspaces. Preserves the carve-out wire literals tests assert (Celery task names, OTel key "search_space.id").
This commit is contained in:
parent
56826a63bc
commit
ca9bd28934
124 changed files with 1269 additions and 1269 deletions
|
|
@ -38,16 +38,16 @@ def test_backend_resolver_returns_multi_root_backend_for_single_root(tmp_path: P
|
|||
def test_backend_resolver_uses_cloud_mode_by_default():
|
||||
resolver = build_backend_resolver(FilesystemSelection())
|
||||
backend = resolver(_RuntimeStub())
|
||||
# When no search_space_id is provided we fall back to StateBackend so
|
||||
# When no workspace_id is provided we fall back to StateBackend so
|
||||
# sub-agents / tests without DB access still work.
|
||||
assert backend.__class__.__name__ == "StateBackend"
|
||||
|
||||
|
||||
def test_backend_resolver_uses_kb_postgres_in_cloud_with_search_space():
|
||||
resolver = build_backend_resolver(FilesystemSelection(), search_space_id=42)
|
||||
def test_backend_resolver_uses_kb_postgres_in_cloud_with_workspace():
|
||||
resolver = build_backend_resolver(FilesystemSelection(), workspace_id=42)
|
||||
backend = resolver(_RuntimeStub())
|
||||
assert backend.__class__.__name__ == "KBPostgresBackend"
|
||||
assert backend.search_space_id == 42
|
||||
assert backend.workspace_id == 42
|
||||
|
||||
|
||||
def test_backend_resolver_returns_multi_root_backend_for_multiple_roots(tmp_path: Path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue