Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
A software engineering team is building an event-driven microservices application that reads from and writes to Google Cloud Pub/Sub and Cloud Firestore. During continuous integration (CI) pipeline executions on self-hosted runners, the team wants to run automated integration tests to validate end-to-end message flows and data persistence logic.
The CI environment has strict operational constraints:
Which strategy should the team implement in their CI pipeline?
Use Terraform in the CI pipeline to dynamically create live Pub/Sub topics and Firestore databases before testing and run a terraform destroy command after test completion.
Provision a dedicated testing project in Google Cloud, inject service account keys into the CI runner, and run tests against live cloud resources with budget alerts configured.
Configure Private Google Access and VPC Service Controls around a shared testing VPC to redirect live client API traffic through a private internal endpoint.
Run local Google Cloud emulators for Pub/Sub and Firestore within the CI environment and export the corresponding emulator host environment variables for the test process.
Use Terraform in the CI pipeline to dynamically create live Pub/Sub topics and Firestore databases before testing and run a terraform destroy command after test completion.
Provision a dedicated testing project in Google Cloud, inject service account keys into the CI runner, and run tests against live cloud resources with budget alerts configured.
Configure Private Google Access and VPC Service Controls around a shared testing VPC to redirect live client API traffic through a private internal endpoint.
Run local Google Cloud emulators for Pub/Sub and Firestore within the CI environment and export the corresponding emulator host environment variables for the test process.
Google Cloud emulators (such as the Cloud Pub/Sub emulator and Cloud Firestore emulator) are local software instances provided via the Google Cloud CLI and official container images. They replicate the API behavior, in-memory state management, and messaging semantics of Google Cloud services locally without connecting to live cloud backends.
localhost or local container networks without making external network calls.PUBSUB_EMULATOR_HOST=localhost:8085 and FIRESTORE_EMULATOR_HOST=localhost:8080). When these variables are exported, client libraries bypass production authentication checks and redirect all gRPC/REST calls directly to the local emulator endpoints.Using local emulators directly solves the isolation, cost, and developer-experience challenges of running automated integration tests in CI pipelines while maintaining exact API parity with production services.