Skip to content

Commit 9668eb9

Browse files
authored
Merge branch 'main' into docs/localstack-auth-token-warning
2 parents 38d7f81 + 18e55b8 commit 9668eb9

File tree

11 files changed

+24
-40
lines changed

11 files changed

+24
-40
lines changed

core/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ dependencies {
8080

8181
shaded 'org.awaitility:awaitility:4.3.0'
8282

83-
api platform('com.github.docker-java:docker-java-bom:3.7.0')
84-
shaded platform('com.github.docker-java:docker-java-bom:3.7.0')
83+
api platform('com.github.docker-java:docker-java-bom:3.7.1')
84+
shaded platform('com.github.docker-java:docker-java-bom:3.7.1')
8585

8686
api "com.github.docker-java:docker-java-api"
8787

core/src/main/java/org/testcontainers/containers/DockerModelRunnerContainer.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,20 @@ public DockerModelRunnerContainer withModel(String model) {
7979
return this;
8080
}
8181

82+
/**
83+
* Returns the base endpoint URL for the Docker Model Runner service.
84+
*
85+
* @return the base URL in the format {@code http://<host>:<port>}
86+
*/
8287
public String getBaseEndpoint() {
8388
return "http://" + getHost() + ":" + getMappedPort(PORT);
8489
}
8590

91+
/**
92+
* Returns the OpenAI-compatible API endpoint URL for the Docker Model Runner service.
93+
*
94+
* @return the OpenAI-compatible endpoint URL in the format {@code http://<host>:<port>/engines}
95+
*/
8696
public String getOpenAIEndpoint() {
8797
return getBaseEndpoint() + "/engines";
8898
}

core/src/test/java/org/testcontainers/junit/ComposeContainerVolumeRemovalTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.testcontainers.junit;
22

3+
import org.junit.jupiter.api.Disabled;
34
import org.junit.jupiter.params.ParameterizedTest;
45
import org.junit.jupiter.params.provider.Arguments;
56
import org.junit.jupiter.params.provider.MethodSource;
@@ -16,6 +17,7 @@
1617
import static org.assertj.core.api.Assertions.assertThat;
1718
import static org.awaitility.Awaitility.await;
1819

20+
@Disabled
1921
class ComposeContainerVolumeRemovalTest {
2022

2123
public static Stream<Arguments> params() {

core/src/test/java/org/testcontainers/junit/ComposeContainerWithWaitStrategies.java renamed to core/src/test/java/org/testcontainers/junit/ComposeContainerWithWaitStrategiesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import static org.assertj.core.api.Assertions.assertThat;
1212

13-
class ComposeContainerWithWaitStrategies {
13+
class ComposeContainerWithWaitStrategiesTest {
1414

1515
private static final int REDIS_PORT = 6379;
1616

core/src/test/java/org/testcontainers/junit/DockerComposeContainerVolumeRemovalTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.testcontainers.junit;
22

3+
import org.junit.jupiter.api.Disabled;
34
import org.junit.jupiter.params.ParameterizedTest;
45
import org.junit.jupiter.params.provider.MethodSource;
56
import org.testcontainers.DockerClientFactory;
@@ -15,6 +16,7 @@
1516
import static org.assertj.core.api.Assertions.assertThat;
1617
import static org.awaitility.Awaitility.await;
1718

19+
@Disabled
1820
class DockerComposeContainerVolumeRemovalTest {
1921

2022
public static Object[][] params() {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ org.gradle.caching=true
33
org.gradle.configureondemand=true
44
org.gradle.jvmargs=-Xmx2g
55

6-
testcontainers.version=2.0.2
6+
testcontainers.version=2.0.4

gradle/publishing.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ publishing {
9696
}
9797
repositories {
9898
maven {
99-
url = layout.buildDirectory.dir('staging-deploy')
99+
url = rootProject.layout.buildDirectory.dir('staging-deploy')
100100
}
101101
}
102102
}
@@ -112,7 +112,7 @@ jreleaser {
112112
central {
113113
active = 'ALWAYS'
114114
url = 'https://central.sonatype.com/api/v1/publisher'
115-
stagingRepository(layout.buildDirectory.dir("staging-deploy").get().toString())
115+
stagingRepository(rootProject.layout.buildDirectory.dir("staging-deploy").get().toString())
116116
stage = 'UPLOAD'
117117
applyMavenCentralRules = true
118118
namespace = 'org.testcontainers'

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,4 @@ nav:
140140
- bounty.md
141141
edit_uri: edit/main/docs/
142142
extra:
143-
latest_version: 2.0.2
143+
latest_version: 2.0.4

modules/cockroachdb/src/test/java/org/testcontainers/CockroachDBTestImages.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,4 @@
44

55
public interface CockroachDBTestImages {
66
DockerImageName COCKROACHDB_IMAGE = DockerImageName.parse("cockroachdb/cockroach:v22.2.3");
7-
8-
DockerImageName FIRST_COCKROACHDB_IMAGE_WITH_ENV_VARS_SUPPORT = DockerImageName.parse(
9-
"cockroachdb/cockroach:v22.1.0"
10-
);
11-
12-
DockerImageName COCKROACHDB_IMAGE_WITH_ENV_VARS_UNSUPPORTED = DockerImageName.parse(
13-
"cockroachdb/cockroach:v21.2.17"
14-
);
157
}

modules/cockroachdb/src/test/java/org/testcontainers/cockroachdb/CockroachContainerTest.java

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import java.util.logging.LogManager;
1212

1313
import static org.assertj.core.api.Assertions.assertThat;
14-
import static org.assertj.core.api.Assertions.assertThatThrownBy;
1514

1615
class CockroachContainerTest extends AbstractContainerDatabaseTest {
1716
static {
@@ -22,7 +21,7 @@ class CockroachContainerTest extends AbstractContainerDatabaseTest {
2221
@Test
2322
void testSimple() throws SQLException {
2423
try ( // container {
25-
CockroachContainer cockroach = new CockroachContainer("cockroachdb/cockroach:v22.2.3")
24+
CockroachContainer cockroach = new CockroachContainer("cockroachdb/cockroach:v26.1.1")
2625
// }
2726
) {
2827
cockroach.start();
@@ -71,9 +70,7 @@ void testWithAdditionalUrlParamInJdbcUrl() {
7170
@Test
7271
void testWithUsernamePasswordDatabase() throws SQLException {
7372
try (
74-
CockroachContainer cockroach = new CockroachContainer(
75-
CockroachDBTestImages.FIRST_COCKROACHDB_IMAGE_WITH_ENV_VARS_SUPPORT
76-
)
73+
CockroachContainer cockroach = new CockroachContainer(CockroachDBTestImages.COCKROACHDB_IMAGE)
7774
.withUsername("test_user")
7875
.withPassword("test_password")
7976
.withDatabaseName("test_database")
@@ -90,25 +87,6 @@ void testWithUsernamePasswordDatabase() throws SQLException {
9087
}
9188
}
9289

93-
@Test
94-
void testAnExceptionIsThrownWhenImageDoesNotSupportEnvVars() {
95-
CockroachContainer cockroachContainer = new CockroachContainer(
96-
CockroachDBTestImages.COCKROACHDB_IMAGE_WITH_ENV_VARS_UNSUPPORTED
97-
);
98-
99-
assertThatThrownBy(() -> cockroachContainer.withUsername("test_user"))
100-
.isInstanceOf(UnsupportedOperationException.class)
101-
.withFailMessage("Setting a username in not supported in the versions below 22.1.0");
102-
103-
assertThatThrownBy(() -> cockroachContainer.withPassword("test_password"))
104-
.isInstanceOf(UnsupportedOperationException.class)
105-
.withFailMessage("Setting a password in not supported in the versions below 22.1.0");
106-
107-
assertThatThrownBy(() -> cockroachContainer.withDatabaseName("test_database"))
108-
.isInstanceOf(UnsupportedOperationException.class)
109-
.withFailMessage("Setting a databaseName in not supported in the versions below 22.1.0");
110-
}
111-
11290
@Test
11391
void testInitializationScript() throws SQLException {
11492
String sql =

0 commit comments

Comments
 (0)