pom.xml
<dependency>
<groupId>com.playtika.testcontainers</groupId>
<artifactId>embedded-google-pubsub</artifactId>
<scope>test</scope>
</dependency>
-
embedded.google.pubsub.enabled
(true|false, default is 'true')
-
embedded.google.pubsub.reuseContainer
(true|false, default is 'false')
-
embedded.google.pubsub.dockerImage
(default is set to 'google/cloud-sdk:257.0.0')
-
You can pick wanted version on dockerhub
-
-
embedded.google.pubsub.host
(default is 0.0.0.0)
-
embedded.google.pubsub.port
(default is 8089)
-
embedded.google.pubsub.project-id
(default is my-project-id)
-
Topics and subscriptions:
embedded.google.pubsub.topics-and-subscriptions[0].topic=topic0_name embedded.google.pubsub.topics-and-subscriptions[0].subscription=subscription0_name embedded.google.pubsub.topics-and-subscriptions[1].topic=topic0_name embedded.google.pubsub.topics-and-subscriptions[1].subscription=subscription0_name
To auto-configure spring-cloud-gcp-starter-pubsub
use these properties in your test application.properties
:
/src/test/resources/application.properties
spring.cloud.gcp.project-id=${embedded.google.pubsub.project-id}
spring.cloud.gcp.pubsub.emulatorHost=${embedded.google.pubsub.host}:${embedded.google.pubsub.port}