From 8e818f7b12fd86bf7286d07be25834b6eab92f4c Mon Sep 17 00:00:00 2001 From: Filip Knefel Date: Tue, 22 Apr 2025 12:07:37 +0200 Subject: [PATCH 1/3] box source connector integration test --- test/integration/connectors/test_box.py | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 test/integration/connectors/test_box.py diff --git a/test/integration/connectors/test_box.py b/test/integration/connectors/test_box.py new file mode 100644 index 000000000..a1eef3922 --- /dev/null +++ b/test/integration/connectors/test_box.py @@ -0,0 +1,44 @@ +import os +from pathlib import Path + +import pytest + +from test.integration.connectors.utils.constants import BLOB_STORAGE_TAG, SOURCE_TAG +from test.integration.connectors.utils.validation.source import ( + SourceValidationConfigs, + source_connector_validation, +) +from test.integration.utils import requires_env +from unstructured_ingest.processes.connectors.fsspec.box import ( + CONNECTOR_TYPE, + BoxAccessConfig, + BoxConnectionConfig, + BoxDownloader, + BoxDownloaderConfig, + BoxIndexer, + BoxIndexerConfig, +) + + +@pytest.mark.asyncio +@pytest.mark.tags(CONNECTOR_TYPE, SOURCE_TAG, BLOB_STORAGE_TAG) +@requires_env("BOX_APP_CONFIG") +async def test_box_source(tmp_path: Path): + access_config = BoxAccessConfig(box_app_config=os.environ["BOX_APP_CONFIG"]) + connection_config = BoxConnectionConfig(access_config=access_config) + indexer_config = BoxIndexerConfig(remote_url="box://utic-test-ingest-fixtures") + indexer = BoxIndexer(connection_config=connection_config, index_config=indexer_config) + + downloader_config = BoxDownloaderConfig(download_dir=tmp_path) + downloader = BoxDownloader( + connection_config=connection_config, download_config=downloader_config + ) + + await source_connector_validation( + indexer=indexer, + downloader=downloader, + configs=SourceValidationConfigs( + test_id="box", + expected_num_files=2, + ), + ) From 22b16252231bc5c5d7de4375fbd87519d1841398 Mon Sep 17 00:00:00 2001 From: Filip Knefel Date: Tue, 22 Apr 2025 12:09:28 +0200 Subject: [PATCH 2/3] Version bump --- unstructured_ingest/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unstructured_ingest/__version__.py b/unstructured_ingest/__version__.py index 3dd460249..cbfc3f08b 100644 --- a/unstructured_ingest/__version__.py +++ b/unstructured_ingest/__version__.py @@ -1 +1 @@ -__version__ = "1.0.18" # pragma: no cover +__version__ = "1.0.19" # pragma: no cover From 6d60cf4c94b7e99be516f3d639b518487b0be041 Mon Sep 17 00:00:00 2001 From: Filip Knefel Date: Tue, 22 Apr 2025 12:17:18 +0200 Subject: [PATCH 3/3] Set box env-var --- .github/workflows/e2e.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index b7ce590e1..e6c8a2ac7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -108,6 +108,8 @@ jobs: # Sharepoint SHAREPOINT_CLIENT_ID: ${{ secrets.SHAREPOINT_CLIENT_ID }} SHAREPOINT_CRED: ${{ secrets.SHAREPOINT_CRED }} + # Box + BOX_APP_CONFIG: ${{ secrets.BOX_APP_CONFIG }} run : | make integration-test-connectors-blob-storage make parse-skipped-tests