Bug: Azurite unable to run create_container

Open
#761 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
azure, docker, python
Domain
cloud, testing

Research direction

Start with the AzuriteContainer entry point and reproduce the hang using BlobServiceClient.create_container as shown. Check the container connection string and startup behavior first; done means create_container returns successfully so subsequent get_blob_client and upload_blob operations can proceed, with a regression test covering the reproduction.

Written by the indexing model from the issue text.

Description

Describe the bug

when using a Blob Service Client on a Azurite container, an azure blob storage container cannot be created, thus testing that requires containers cannot continue. E.g. get_blob_client and upload_blob requires a container.

To Reproduce

Provide a self-contained code snippet that illustrates the bug or unexpected behavior. Ideally, send a Pull Request to illustrate with a test that illustrates the problem.

The last line here just hangs indefinitely, unable to proceed further

from azure.storage.blob import BlobServiceClient
from testcontainers.azurite import AzuriteContainer

with AzureContainer() as azurite_container:
    connection_string = azurite_container.get_connection_string()
    service_client = BlobServiceClient.from_connection_string(connection_string)
    service_client.create_container(name="test")

Runtime environment

  • M2 Pro, sonoma 14.7
  • Python 3.12.3
  • Docker 4.37.2
  • Testcontainers 4.9.0 (via poetry)
Dominant language
Python
Stars
2.3k
Forks
397
Avg merge
8d 16h
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from testcontainers/testcontainers-python

All issues in testcontainers/testcontainers-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.