Skip to content

Commit c1d1751

Browse files
committed
Fix an issue with the TestcontainersConfiguration.getInstance().getEnvVarOrUserProperty checking if the value is not empty
1 parent af62f82 commit c1d1751

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class ComposeContainer extends FailureDetectingExternalResource implement
6262

6363
public static final String COMPOSE_EXECUTABLE = SystemUtils.IS_OS_WINDOWS ? "docker.exe" : "docker";
6464

65-
public static final String DEFAULT_DOCKER_IMAGE = "docker:27.5.0";
65+
private static final String DEFAULT_DOCKER_IMAGE = "docker:27.5.0";
6666

6767
private final ComposeDelegate composeDelegate;
6868

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public DockerComposeContainer(DockerImageName image, String identifier, File...
8888
public DockerComposeContainer(DockerImageName image, String identifier, List<File> composeFiles) {
8989
this.composeDelegate =
9090
new ComposeDelegate(
91-
ComposeDelegate.ComposeVersion.V2,
91+
ComposeDelegate.ComposeVersion.V1,
9292
composeFiles,
9393
identifier,
9494
COMPOSE_EXECUTABLE,
@@ -126,7 +126,7 @@ public DockerComposeContainer(String identifier, List<File> composeFiles) {
126126
composeFiles,
127127
identifier,
128128
COMPOSE_EXECUTABLE,
129-
getDockerImageName()
129+
DockerImageName.parse("docker/compose:1.29.2")
130130
);
131131
this.project = this.composeDelegate.getProject();
132132
}

core/src/main/java/org/testcontainers/utility/TestcontainersConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ private String getConfigurable(
244244
}
245245

246246
for (final Properties properties : propertiesSources) {
247-
if (properties.get(propertyName) != null) {
247+
if (properties.get(propertyName) != null && !properties.get(propertyName).toString().trim().isEmpty()) {
248248
return (String) properties.get(propertyName);
249249
}
250250
}

0 commit comments

Comments
 (0)