Repository navigation
fix(gcs): add fake-gcs-server container - #1145
AvinashKalamati wants to merge 2 commits into
Conversation
|
Ran this against a downstream suite that drives fake-gcs-server through its own |
|
Thanks a lot @hampsterx for testing this against omniload's suite, great to see it works as a drop-in replacement! |
amotl
left a comment
There was a problem hiding this comment.
@hampsterx evaluated your container wrapper successfully. Thank you!
|
Hi @amotl — quick heads-up: the four workflow runs from Oct 26 just expired after 30 days awaiting approval, so they now show as failed with no jobs run. Nothing actually ran, so there's no test failure to fix on my side. Could you approve the workflows to run when you get a chance? Happy to push a fresh commit if that helps retrigger them. |
|
Hi @AvinashKalamati, thank you very much. I am not a maintainer here, so I can't approve any CI workflows. @alexanderankin to the rescue? With kind regards, |
|
I don't see the ability to approve the runs on this phone, only the pr itself |
New Container
Fixes #1084
Adds
GcsContainer(testcontainers.community.gcs), a Google Cloud Storage emulator based onfake-gcs-server, similar to the existing GCS support in
testcontainers for Java, Go and .NET, and to
AzuriteContainerfor Azure.What it does
fsouza/fake-gcs-server:1.56.1over plain HTTP with the in-memory backend./storage/v1/b) responds.externalUrlviaPUT /_internal/configto the host-mapped address.Without this, object links such as
mediaLinkpoint to0.0.0.0:4443, which is unreachable from the host.-
get_url()returns the emulator endpoint;get_client()returns agoogle.cloud.storage.Clientwith anonymous credentials (requires
google-cloud-storageto be installed).Tests
Passing locally on Python 3.10, 3.11 and 3.14; doctest and pre-commit pass.
PR Checklist
src/testcontainers/community/gcs/testcontainers.community.gcs.*tests/community/gcs/docs/community/gcs.rstwith.. autoclassand.. titlepyproject.tomlasgcs = []main