Skip to content

Commit 5ee47c2

Browse files
Migrate to Testcontainers 2.x (#715)
- Update artifact names to testcontainers-* prefix (2.0.2) - Update LocalStackContainer package import - Replace Service.S3 enum with string "s3" - Addresses breaking changes in Testcontainers 2.0.0
1 parent ef07fbd commit 5ee47c2

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ testing {
168168
integrationTest(JvmTestSuite) {
169169
dependencies {
170170
implementation(project())
171-
implementation('org.testcontainers:junit-jupiter:1.21.3')
172-
implementation('org.testcontainers:localstack:1.21.3')
173-
implementation('org.testcontainers:testcontainers:1.21.3')
171+
implementation('org.testcontainers:testcontainers-junit-jupiter:2.0.2')
172+
implementation('org.testcontainers:testcontainers-localstack:2.0.2')
173+
implementation('org.testcontainers:testcontainers:2.0.2')
174174
}
175175
}
176176
withType(JvmTestSuite).configureEach {

src/integrationTest/java/software/amazon/nio/spi/s3/Containers.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package software.amazon.nio.spi.s3;
77

8-
import org.testcontainers.containers.localstack.LocalStackContainer;
8+
import org.testcontainers.localstack.LocalStackContainer;
99
import org.testcontainers.utility.DockerImageName;
1010

1111
import java.net.URI;
@@ -21,7 +21,6 @@
2121

2222
import static org.assertj.core.api.Assertions.assertThat;
2323
import static org.assertj.core.api.Assertions.assertThatCode;
24-
import static org.testcontainers.containers.localstack.LocalStackContainer.Service.S3;
2524
import static software.amazon.nio.spi.s3.config.S3NioSpiConfiguration.S3_SPI_ENDPOINT_PROTOCOL_PROPERTY;
2625

2726
abstract class Containers {
@@ -31,7 +30,7 @@ abstract class Containers {
3130
static {
3231
LOCAL_STACK_CONTAINER = new LocalStackContainer(
3332
DockerImageName.parse("localstack/localstack:4.2")
34-
).withServices(S3);
33+
).withServices("s3");
3534
LOCAL_STACK_CONTAINER.start();
3635
System.setProperty(S3_SPI_ENDPOINT_PROTOCOL_PROPERTY, "http");
3736
}

0 commit comments

Comments
 (0)