Repository navigation
fix(gcs): add fake-gcs-server container - #1145
Open
AvinashKalamati wants to merge 2 commits into
Open
AvinashKalamati wants to merge 2 commits into
AvinashKalamati wants to merge 2 commits into
Conversation
This was referenced Oct 27, 2026
|
Ran this against a downstream suite that drives fake-gcs-server through its own |
Author
|
Thanks a lot @hampsterx for testing this against omniload's suite, great to see it works as a drop-in replacement! |
amotl
approved these changes
Oct 27, 2026
amotl
left a comment
Contributor
There was a problem hiding this comment.
@hampsterx evaluated your container wrapper successfully. Thank you!
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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