Skip to content

Commit

Permalink
Move account_name and account_key to azure_server fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Feb 14, 2024
1 parent 13b7919 commit 3bcafea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 5 additions & 1 deletion python/pyarrow/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ def azure_server(tmpdir_factory):
pytest.skip(f"Command {args} failed to execute: {e}")
else:
yield {
'connection': ('127.0.0.1', port),
# Use the standard azurite account_name and account_key.
# https://learn.microsoft.com/en-us/azure/storage/common/storage-use-emulator#authorize-with-shared-key-credentials
'connection': ('127.0.0.1', port, 'devstoreaccount1',
'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2'
'UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='),
'process': proc,
'tempdir': tmpdir,
}
Expand Down
9 changes: 3 additions & 6 deletions python/pyarrow/tests/test_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,14 @@ def azurefs(request, azure_server):
request.config.pyarrow.requires('azure')
from pyarrow.fs import AzureFileSystem

host, port = azure_server['connection']
host, port, account_name, account_key = azure_server['connection']
azureite_authority = f"{host}:{port}"
azureite_scheme = "http"

container = 'pyarrow-filesystem/'

# Use the standard azurite account_name and account_key.
# https://learn.microsoft.com/en-us/azure/storage/common/storage-use-emulator#authorize-with-shared-key-credentials
fs = AzureFileSystem(account_name='devstoreaccount1',
account_key='Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuF'
'q2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==',
fs = AzureFileSystem(account_name=account_name,
account_key=account_key,
blob_storage_authority=azureite_authority,
dfs_storage_authority=azureite_authority,
blob_storage_scheme=azureite_scheme,
Expand Down

0 comments on commit 3bcafea

Please sign in to comment.