Skip to content

Commit 4acc8fd

Browse files
fokioneddumelendez
authored andcommitted
Fix an issue with the TestcontainersConfiguration.getInstance().getEnvVarOrUserProperty checking if the value is not empty
1 parent 11bd114 commit 4acc8fd

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
@@ -60,7 +60,7 @@ public class ComposeContainer implements Startable {
6060

6161
public static final String COMPOSE_EXECUTABLE = SystemUtils.IS_OS_WINDOWS ? "docker.exe" : "docker";
6262

63-
public static final String DEFAULT_DOCKER_IMAGE = "docker:27.5.0";
63+
private static final String DEFAULT_DOCKER_IMAGE = "docker:27.5.0";
6464

6565
private final ComposeDelegate composeDelegate;
6666

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public DockerComposeContainer(DockerImageName image, String identifier, File...
8484
public DockerComposeContainer(DockerImageName image, String identifier, List<File> composeFiles) {
8585
this.composeDelegate =
8686
new ComposeDelegate(
87-
ComposeDelegate.ComposeVersion.V2,
87+
ComposeDelegate.ComposeVersion.V1,
8888
composeFiles,
8989
identifier,
9090
COMPOSE_EXECUTABLE,
@@ -122,7 +122,7 @@ public DockerComposeContainer(String identifier, List<File> composeFiles) {
122122
composeFiles,
123123
identifier,
124124
COMPOSE_EXECUTABLE,
125-
getDockerImageName()
125+
DockerImageName.parse("docker/compose:1.29.2")
126126
);
127127
this.project = this.composeDelegate.getProject();
128128
}

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)