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 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, + ), + ) 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