Update spring-boot-smoke-test-cache to use docker-test plugin

See gh-41228
This commit is contained in:
Andy Wilkinson 2024-06-26 10:46:18 +01:00
parent 24e797f8c2
commit ccb0b2910f
3 changed files with 15 additions and 21 deletions

View File

@ -1,6 +1,7 @@
plugins {
id "java"
id "org.springframework.boot.conventions"
id "org.springframework.boot.docker-test"
}
description = "Spring Boot cache smoke test"
@ -21,18 +22,18 @@ configurations {
}
dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator"))
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-cache"))
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
caffeine(enforcedPlatform(project(":spring-boot-project:spring-boot-dependencies")))
caffeine("com.github.ben-manes.caffeine:caffeine")
couchbase(enforcedPlatform(project(":spring-boot-project:spring-boot-dependencies")))
couchbase(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-couchbase"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-redis"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
dockerTestImplementation("org.testcontainers:junit-jupiter")
ehcache(enforcedPlatform(project(":spring-boot-project:spring-boot-dependencies")))
ehcache("javax.cache:cache-api")
ehcache("org.ehcache:ehcache::jakarta")
@ -40,6 +41,10 @@ dependencies {
hazelcast(enforcedPlatform(project(":spring-boot-project:spring-boot-dependencies")))
hazelcast("com.hazelcast:hazelcast")
hazelcast("com.hazelcast:hazelcast-spring")
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator"))
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-cache"))
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
infinispan(enforcedPlatform(project(":spring-boot-project:spring-boot-dependencies")))
infinispan("javax.cache:cache-api")
@ -55,13 +60,8 @@ dependencies {
replacedBy("org.infinispan:infinispan-core-jakarta", "Java EE 9 baseline")
}
}
redisTestImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-parent")))
redisTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-redis"))
redisTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
redisTestImplementation(project(":spring-boot-project:spring-boot-testcontainers"))
redisTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
redisTestImplementation("org.testcontainers:junit-jupiter")
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
}
def testCaffeine = tasks.register("testCaffeine", Test) {
@ -91,12 +91,6 @@ def testInfinispan = tasks.register("testInfinispan", Test) {
systemProperties = ["spring.cache.jcache.config" : "classpath:infinispan.xml"]
}
def testRedis = tasks.register("testRedis", Test) {
description = "Runs the tests against Redis"
classpath = sourceSets.redisTest.runtimeClasspath
testClassesDirs = sourceSets.redisTest.output.classesDirs
}
tasks.named("check").configure {
dependsOn testCaffeine, testCouchbase, testEhcache, testHazelcast, testInfinispan, testRedis
dependsOn testCaffeine, testCouchbase, testEhcache, testHazelcast, testInfinispan
}