1
0
mirror of synced 2025-12-19 18:14:56 -05:00
Files
airbyte/airbyte-integrations/connectors/source-azure-blob-storage/unit_tests/unit_tests.py
Ella Rohm-Ensing ac3eb28de2 airbyte-ci: add format commands (#31831)
Co-authored-by: Ben Church <ben@airbyte.io>
Co-authored-by: bnchrch <bnchrch@users.noreply.github.com>
Co-authored-by: alafanechere <augustin.lafanechere@gmail.com>
Co-authored-by: Augustin <augustin@airbyte.io>
Co-authored-by: Marius Posta <marius@airbyte.io>
Co-authored-by: alafanechere <alafanechere@users.noreply.github.com>
2023-11-14 02:17:48 -06:00

31 lines
1.3 KiB
Python

# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
from source_azure_blob_storage.legacy_config_transformer import LegacyConfigTransformer
def test_config_convertation():
legacy_config = {
"azure_blob_storage_endpoint": "https://airbyteteststorage.blob.core.windows.net",
"azure_blob_storage_account_name": "airbyteteststorage",
"azure_blob_storage_account_key": "secret/key==",
"azure_blob_storage_container_name": "airbyte-source-azure-blob-storage-test",
"azure_blob_storage_blobs_prefix": "subfolder/",
"azure_blob_storage_schema_inference_limit": 500,
"format": "jsonl",
}
new_config = LegacyConfigTransformer.convert(legacy_config)
assert new_config == {
"azure_blob_storage_account_key": "secret/key==",
"azure_blob_storage_account_name": "airbyteteststorage",
"azure_blob_storage_container_name": "airbyte-source-azure-blob-storage-test",
"azure_blob_storage_endpoint": "https://airbyteteststorage.blob.core.windows.net",
"streams": [
{
"format": {"filetype": "jsonl"},
"legacy_prefix": "subfolder/",
"name": "airbyte-source-azure-blob-storage-test",
"validation_policy": "Emit Record",
}
],
}