!!! note This module is INCUBATING. While it is ready for use and operational in the current version of Testcontainers, it is possible that it may receive breaking changes in the future. See our contributing guidelines for more information on our incubating modules policy.
Testcontainers module for the Google's Cloud SDK.
Currently, the module supports Datastore, Firestore, Pub/Sub and Spanner emulators. In order to use it, you should use the following classes:
- DatastoreEmulatorContainer
- FirestoreEmulatorContainer
- PubSubEmulatorContainer
- SpannerEmulatorContainer
Running GCloud as a stand-in for Google Datastore during a test:
Creating a Datastore container inside_block:creatingDatastoreEmulatorContainer
And how to start it:
Starting a Datastore container inside_block:startingDatastoreEmulatorContainer
Add the following dependency to your pom.xml/build.gradle file:
testCompile "org.testcontainers:gcloud:{{latest_version}}"<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>gcloud</artifactId>
<version>{{latest_version}}</version>
<scope>test</scope>
</dependency>