1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- def setUp(self):
- db.merge_conn(
- Connection(
- conn_id='azure_fileshare_test_key',
- conn_type='azure_file_share',
- login='login',
- password='key',
- )
- )
- db.merge_conn(
- Connection(
- conn_id='azure_fileshare_extras',
- conn_type='azure_fileshare',
- login='login',
- extra=json.dumps(
- {
- 'extra__azure_fileshare__sas_token': 'token',
- 'extra__azure_fileshare__protocol': 'http',
- }
- ),
- )
- )
- db.merge_conn(
- # Neither password nor sas_token present
- Connection(
- conn_id='azure_fileshare_missing_credentials',
- conn_type='azure_fileshare',
- login='login',
- )
- )
- db.merge_conn(
- Connection(
- conn_id='azure_fileshare_extras_deprecated',
- conn_type='azure_fileshare',
- login='login',
- extra=json.dumps(
- {
- 'sas_token': 'token',
- }
- ),
- )
- )
- db.merge_conn(
- Connection(
- conn_id='azure_fileshare_extras_deprecated_empty_wasb_extra',
- conn_type='azure_fileshare',
- login='login',
- password='password',
- extra=json.dumps(
- {
- 'extra__azure_fileshare__shared_access_key': '',
- }
- ),
- )
- )
- db.merge_conn(
- Connection(
- conn_id='azure_fileshare_extras_wrong',
- conn_type='azure_fileshare',
- login='login',
- extra=json.dumps(
- {
- 'wrong_key': 'token',
- }
- ),
- )
- )
|