diff --git a/README.adoc b/README.adoc index d09856852..9c27b13f1 100644 --- a/README.adoc +++ b/README.adoc @@ -19,11 +19,11 @@ Usage of Spring Cloud in your production code is optional, but __you will need i |2.4.X, 2.5.X, 2.6.X, 2.7.X |2.X.X -|3.0.X, 3.1.X +|2.7.X, 3.0.X, 3.1.X |3.0.X |3.2.X -|WIP +|3.1.X |=== [[how-to-use]] diff --git a/embedded-couchbase/src/test/java/com/playtika/testcontainer/couchbase/CouchbaseJavaClientTest.java b/embedded-couchbase/src/test/java/com/playtika/testcontainer/couchbase/CouchbaseJavaClientTest.java index 17550d496..9e4907239 100644 --- a/embedded-couchbase/src/test/java/com/playtika/testcontainer/couchbase/CouchbaseJavaClientTest.java +++ b/embedded-couchbase/src/test/java/com/playtika/testcontainer/couchbase/CouchbaseJavaClientTest.java @@ -1,7 +1,6 @@ package com.playtika.testcontainer.couchbase; import com.couchbase.client.core.env.SeedNode; -import com.couchbase.client.core.env.TimeoutConfig; import com.couchbase.client.core.retry.BestEffortRetryStrategy; import com.couchbase.client.java.Bucket; import com.couchbase.client.java.Cluster; @@ -55,7 +54,7 @@ void plainJavaClientShouldWork() { ClusterEnvironment env = ClusterEnvironment.builder() .retryStrategy(BestEffortRetryStrategy.withExponentialBackoff(Duration.ofMillis(50), Duration.ofMillis(500), 2)) .maxNumRequestsInRetry(5) - .timeoutConfig(TimeoutConfig.kvTimeout(Duration.ofSeconds(20))) + .timeoutConfig(timeout -> timeout.kvTimeout(Duration.ofSeconds(20))) .build(); ClusterOptions options = ClusterOptions diff --git a/embedded-git/pom.xml b/embedded-git/pom.xml index 7eaa80148..51ee9a303 100644 --- a/embedded-git/pom.xml +++ b/embedded-git/pom.xml @@ -13,6 +13,7 @@ embedded-git + 1.75 @@ -20,6 +21,11 @@ com.playtika.testcontainers testcontainers-common + + org.bouncycastle + bcpkix-jdk18on + ${bcpkix-jdk18on.version} + com.playtika.testcontainers embedded-toxiproxy diff --git a/embedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.java b/embedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.java index 0be58108d..ff5b7b4e3 100644 --- a/embedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.java +++ b/embedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.java @@ -85,7 +85,7 @@ public void testPushViaSsh() { writer.print("hello world!"); } git.add().addFilepattern("test_file.txt").call(); - git.commit().setMessage("Test commit").call(); + git.commit().setMessage("Test commit").setSign(false).call(); git.push() .setRemote("origin") .setRefSpecs(new RefSpec(beforeRepoFolderName)) diff --git a/embedded-k3s/pom.xml b/embedded-k3s/pom.xml index 223d1e775..5075d2a01 100644 --- a/embedded-k3s/pom.xml +++ b/embedded-k3s/pom.xml @@ -14,7 +14,7 @@ embedded-k3s - + 1.75 @@ -31,6 +31,11 @@ k3s + + org.bouncycastle + bcpkix-jdk18on + ${bcpkix-jdk18on.version} + io.fabric8 openshift-client-api diff --git a/embedded-keycloak/src/test/java/com/playtika/testcontainer/keycloak/spring/SpringTestApplication.java b/embedded-keycloak/src/test/java/com/playtika/testcontainer/keycloak/spring/SpringTestApplication.java index e87916cb5..92caf6df5 100644 --- a/embedded-keycloak/src/test/java/com/playtika/testcontainer/keycloak/spring/SpringTestApplication.java +++ b/embedded-keycloak/src/test/java/com/playtika/testcontainer/keycloak/spring/SpringTestApplication.java @@ -7,6 +7,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; import org.springframework.web.bind.annotation.GetMapping; @@ -23,13 +24,12 @@ public class SpringTestApplication { @Bean SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { - return http.authorizeHttpRequests() - .requestMatchers("/api/**").fullyAuthenticated() - .and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().oauth2ResourceServer(oauth2 -> oauth2.jwt().jwtAuthenticationConverter(new KeycloakJwtAuthenticationConverter(client))) - .formLogin().disable() - .httpBasic().disable() - .build(); + return http.authorizeHttpRequests(requests -> requests.requestMatchers("/api/**").fullyAuthenticated()) + .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .oauth2ResourceServer(oauth2 -> oauth2.jwt(jwt -> jwt.jwtAuthenticationConverter(new KeycloakJwtAuthenticationConverter(client)))) + .formLogin(AbstractHttpConfigurer::disable) + .httpBasic(AbstractHttpConfigurer::disable) + .build(); } @RolesAllowed("role_reader") diff --git a/embedded-keycloak/src/test/resources/bootstrap-enabled.yml b/embedded-keycloak/src/test/resources/bootstrap-enabled.yml index 649960fa9..c4b59d4d1 100644 --- a/embedded-keycloak/src/test/resources/bootstrap-enabled.yml +++ b/embedded-keycloak/src/test/resources/bootstrap-enabled.yml @@ -1,6 +1,5 @@ embedded: keycloak: enabled: true - docker-image: 'quay.io/keycloak/keycloak:21.0.0' wait-timeout-in-seconds: 60 command: "start-dev --import-realm" diff --git a/embedded-keydb/src/main/java/com/playtika/testcontainer/keydb/wait/KeyDbClusterStatusCheck.java b/embedded-keydb/src/main/java/com/playtika/testcontainer/keydb/wait/KeyDbClusterStatusCheck.java index 2218ea0c0..2d57fb3da 100644 --- a/embedded-keydb/src/main/java/com/playtika/testcontainer/keydb/wait/KeyDbClusterStatusCheck.java +++ b/embedded-keydb/src/main/java/com/playtika/testcontainer/keydb/wait/KeyDbClusterStatusCheck.java @@ -7,7 +7,7 @@ import org.testcontainers.containers.ContainerLaunchException; import redis.clients.jedis.Jedis; -import java.util.List; +import java.util.Map; @Slf4j @RequiredArgsConstructor @@ -37,14 +37,14 @@ private void logClusterInfo() { try (Jedis jedis = createJedis()) { String clusterInfo = jedis.clusterInfo(); String info = jedis.info(); - List config = jedis.configGet("*"); + Map config = jedis.configGet("*"); String clusterNodes = jedis.clusterNodes(); log.error("Cluster in failed state:\n" + "-- cluster info:\n{}\n" + "-- nodes:\n{}\n" + "-- info:\n{}\n" + "-- config:\n{}", - clusterInfo, clusterNodes, info, String.join("\n", config)); + clusterInfo, clusterNodes, info, String.join("\n", config.values())); } } diff --git a/embedded-opensearch/pom.xml b/embedded-opensearch/pom.xml index 6eae0a8b1..b391c4663 100644 --- a/embedded-opensearch/pom.xml +++ b/embedded-opensearch/pom.xml @@ -12,6 +12,11 @@ embedded-opensearch + + 1.3.0 + 2.0.1 + + com.playtika.testcontainers @@ -24,12 +29,12 @@ org.opensearch opensearch-testcontainers - 2.0.1 + ${opensearch-testcontainers.version} org.opensearch.client spring-data-opensearch-starter - 1.2.1 + ${spring-data-opensearch-starter.version} org.springframework.boot diff --git a/embedded-redis/src/main/java/com/playtika/testcontainer/redis/wait/RedisClusterStatusCheck.java b/embedded-redis/src/main/java/com/playtika/testcontainer/redis/wait/RedisClusterStatusCheck.java index 81879a1b4..a1f0af652 100644 --- a/embedded-redis/src/main/java/com/playtika/testcontainer/redis/wait/RedisClusterStatusCheck.java +++ b/embedded-redis/src/main/java/com/playtika/testcontainer/redis/wait/RedisClusterStatusCheck.java @@ -7,7 +7,7 @@ import org.testcontainers.containers.ContainerLaunchException; import redis.clients.jedis.Jedis; -import java.util.List; +import java.util.Map; @Slf4j @RequiredArgsConstructor @@ -37,14 +37,14 @@ private void logClusterInfo() { try (Jedis jedis = createJedis()) { String clusterInfo = jedis.clusterInfo(); String info = jedis.info(); - List config = jedis.configGet("*"); + Map config = jedis.configGet("*"); String clusterNodes = jedis.clusterNodes(); log.error("Cluster in failed state:\n" + "-- cluster info:\n{}\n" + "-- nodes:\n{}\n" + "-- info:\n{}\n" + "-- config:\n{}", - clusterInfo, clusterNodes, info, String.join("\n", config)); + clusterInfo, clusterNodes, info, String.join("\n", config.values())); } } diff --git a/pom.xml b/pom.xml index 4c5a56954..821273923 100644 --- a/pom.xml +++ b/pom.xml @@ -172,7 +172,6 @@ - ossrh @@ -191,7 +190,7 @@ maven-compiler-plugin ${maven-compiler-plugin.version} - true + true diff --git a/testcontainers-spring-boot-parent/pom.xml b/testcontainers-spring-boot-parent/pom.xml index cb13894db..1275403ef 100644 --- a/testcontainers-spring-boot-parent/pom.xml +++ b/testcontainers-spring-boot-parent/pom.xml @@ -16,8 +16,8 @@ 1.19.3 - 3.1.5 - 2022.0.4 + 3.2.0 + 2023.0.0 4.8.4 3.15.4 5.10.1