Repository navigation
feat(gcp): add the GCP module floci.gcp with FlociGcpContainer - #23
Merged
Merged
Conversation
FlociGcpContainer starts floci/floci-gcp on the shared core: a config dataclass per emulator service (enabled, plus mock for the container-backed ones), Docker socket detection, TLS config, the project ID, and get_emulator_env() with the *_EMULATOR_HOST variables Google's SDKs read. Integration tests run on floci/floci-gcp:0.10.0, pinned in .github/docker-images.txt; google-cloud-storage is a dev dependency only. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
|
The GCP example put get_emulator_env() into os.environ and left it there, so a later test creating a Google client would inherit the stopped emulator's address and project. It now sets the variables with pytest's monkeypatch, as the integration test does. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
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.
Summary
Adds
floci.gcp.FlociGcpContainerstartsfloci/floci-gcpon the shared core: a config dataclass per emulator service (enabled, plus mock for the container-backed ones), Docker socket detection, TLS config,with_project_id, and the connection helpersget_endpoint,get_project_id,get_emulator_env,get_https_endpointandget_tls_certificate.The emulator-env helper returns the variables Google's client libraries read (
PUBSUB_,FIRESTORE_,DATASTORE_,SECRET_MANAGER_,FIREBASE_AUTH_EMULATOR_HOST,STORAGE_EMULATOR_HOST,STORAGE_EMULATOR_HOST_GRPC,GOOGLE_CLOUD_PROJECT). It also carriesLOGGING_EMULATOR_HOSTandKMS_EMULATOR_HOST, which no client library reads; the README says so.Cloud Functions is control plane only in this emulator release and needs no Docker socket; BigQuery needs none when an external DuckDB URL is set. No sibling-container service is exercised.
Integration tests run against the pinned
floci/floci-gcp:0.10.0, including a Cloud Storage round trip withgoogle-cloud-storage(a dev dependency only).Related issue
No issue. This is the GCP step of the multi-cloud plan for the Testcontainers family: one repo per language, one module per cloud on a shared core. It follows the Azure module.
Type of change
fix:commit)feat:commit)feat!:commit orBREAKING CHANGE:footer)Checklist
ruff check . && ruff format --check . && mypy floci && pytest -m "not integration"passes, andpytest -m integrationif Docker is availablefeat:,fix:,chore:, etc.)git commit -s)