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>
31 lines
1.3 KiB
Python
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",
|
|
}
|
|
],
|
|
}
|