mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 17:56:25 +02:00
feat: add integration and unit tests for local folder indexing and document versioning
This commit is contained in:
parent
96a58d0d30
commit
775dea7894
4 changed files with 894 additions and 0 deletions
|
|
@ -166,3 +166,24 @@ def make_connector_document(db_connector, db_user):
|
|||
return ConnectorDocument(**defaults)
|
||||
|
||||
return _make
|
||||
|
||||
|
||||
@pytest_asyncio.fixture
|
||||
async def db_local_folder_connector(
|
||||
db_session: AsyncSession, db_user: User, db_search_space: SearchSpace, tmp_path
|
||||
) -> SearchSourceConnector:
|
||||
connector = SearchSourceConnector(
|
||||
name="Test Local Folder",
|
||||
connector_type=SearchSourceConnectorType.LOCAL_FOLDER_CONNECTOR,
|
||||
config={
|
||||
"folder_path": str(tmp_path),
|
||||
"folder_name": "test-folder",
|
||||
"exclude_patterns": [],
|
||||
"file_extensions": None,
|
||||
},
|
||||
search_space_id=db_search_space.id,
|
||||
user_id=db_user.id,
|
||||
)
|
||||
db_session.add(connector)
|
||||
await db_session.flush()
|
||||
return connector
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue