123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- def setup_module():
- connection_client_secret = Connection(
- conn_id=DEFAULT_CONNECTION_CLIENT_SECRET,
- conn_type="azure_data_factory",
- login="clientId",
- password="clientSecret",
- extra=json.dumps(
- {
- "extra__azure_data_factory__tenantId": "tenantId",
- "extra__azure_data_factory__subscriptionId": "subscriptionId",
- "extra__azure_data_factory__resource_group_name": DEFAULT_RESOURCE_GROUP,
- "extra__azure_data_factory__factory_name": DEFAULT_FACTORY,
- }
- ),
- )
- connection_default_credential = Connection(
- conn_id=DEFAULT_CONNECTION_DEFAULT_CREDENTIAL,
- conn_type="azure_data_factory",
- extra=json.dumps(
- {
- "extra__azure_data_factory__subscriptionId": "subscriptionId",
- "extra__azure_data_factory__resource_group_name": DEFAULT_RESOURCE_GROUP,
- "extra__azure_data_factory__factory_name": DEFAULT_FACTORY,
- }
- ),
- )
- connection_missing_subscription_id = Connection(
- conn_id="azure_data_factory_missing_subscription_id",
- conn_type="azure_data_factory",
- login="clientId",
- password="clientSecret",
- extra=json.dumps(
- {
- "extra__azure_data_factory__tenantId": "tenantId",
- "extra__azure_data_factory__resource_group_name": DEFAULT_RESOURCE_GROUP,
- "extra__azure_data_factory__factory_name": DEFAULT_FACTORY,
- }
- ),
- )
- connection_missing_tenant_id = Connection(
- conn_id="azure_data_factory_missing_tenant_id",
- conn_type="azure_data_factory",
- login="clientId",
- password="clientSecret",
- extra=json.dumps(
- {
- "extra__azure_data_factory__subscriptionId": "subscriptionId",
- "extra__azure_data_factory__resource_group_name": DEFAULT_RESOURCE_GROUP,
- "extra__azure_data_factory__factory_name": DEFAULT_FACTORY,
- }
- ),
- )
- db.merge_conn(connection_client_secret)
- db.merge_conn(connection_default_credential)
- db.merge_conn(connection_missing_subscription_id)
- db.merge_conn(connection_missing_tenant_id)
|