Bug: Azurite unable to run create_container

未關閉
#761 7 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
azure, docker, python
領域
cloud, testing

研究方向

從 AzuriteContainer 進入點開始,並如所示使用 BlobServiceClient.create_container 重現卡住的情況。先檢查容器連接字串和啟動行為;當 create_container 成功返回,使後續的 get_blob_client 和 upload_blob 操作可以繼續執行,並包含涵蓋此重現的迴歸測試時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

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)
主要語言
Python
星號
2.3k
分支
397
平均合併
8 天 16 小時
30 天內合併 PR
5

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

testcontainers/testcontainers-python 的其他 Issue

查看 testcontainers/testcontainers-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。