diff --git a/lib/stove-testing-e2e-couchbase/src/main/kotlin/com/trendyol/stove/testing/e2e/couchbase/Options.kt b/lib/stove-testing-e2e-couchbase/src/main/kotlin/com/trendyol/stove/testing/e2e/couchbase/Options.kt index 8b88462d..7105614e 100644 --- a/lib/stove-testing-e2e-couchbase/src/main/kotlin/com/trendyol/stove/testing/e2e/couchbase/Options.kt +++ b/lib/stove-testing-e2e-couchbase/src/main/kotlin/com/trendyol/stove/testing/e2e/couchbase/Options.kt @@ -25,7 +25,7 @@ data class CouchbaseExposedConfiguration( data class CouchbaseSystemOptions( val defaultBucket: String, - val registry: String = DEFAULT_REGISTRY, + val containerOptions: ContainerOptions = ContainerOptions(), override val configureExposedConfiguration: (CouchbaseExposedConfiguration) -> List = { _ -> listOf() }, val objectMapper: ObjectMapper = StoveObjectMapper.byConfiguring { registerModule(JsonValueModule()) } ) : SystemOptions, ConfiguresExposedConfiguration { @@ -48,10 +48,15 @@ data class CouchbaseContext( val options: CouchbaseSystemOptions ) +data class ContainerOptions( + val registry: String = DEFAULT_REGISTRY, + val imageVersion: String = "latest" +) + internal fun TestSystem.withCouchbase(options: CouchbaseSystemOptions): TestSystem { val bucketDefinition = BucketDefinition(options.defaultBucket) val couchbaseContainer = - withProvidedRegistry("couchbase/server", options.registry) { + withProvidedRegistry("couchbase/server:${options.containerOptions.imageVersion}", options.containerOptions.registry) { CouchbaseContainer(it).withBucket(bucketDefinition) .withReuse(this.options.keepDependenciesRunning) } diff --git a/lib/stove-testing-e2e-couchbase/src/test/kotlin/com/trendyol/stove/testing/e2e/couchbase/CouchbaseTestSystemTests.kt b/lib/stove-testing-e2e-couchbase/src/test/kotlin/com/trendyol/stove/testing/e2e/couchbase/CouchbaseTestSystemTests.kt index 1f3f7143..9df364b3 100644 --- a/lib/stove-testing-e2e-couchbase/src/test/kotlin/com/trendyol/stove/testing/e2e/couchbase/CouchbaseTestSystemTests.kt +++ b/lib/stove-testing-e2e-couchbase/src/test/kotlin/com/trendyol/stove/testing/e2e/couchbase/CouchbaseTestSystemTests.kt @@ -22,7 +22,12 @@ class Setup : AbstractProjectConfig() { TestSystem {} .with { couchbase { - CouchbaseSystemOptions(defaultBucket = TEST_BUCKET) + CouchbaseSystemOptions( + defaultBucket = TEST_BUCKET, + containerOptions = ContainerOptions( + imageVersion = "latest" + ) + ) .migrations { register() }