From bd4025059be8cd1029c9d398c33d0e7ce8f65cdf Mon Sep 17 00:00:00 2001 From: Richard North Date: Mon, 18 Sep 2017 21:50:03 +0100 Subject: [PATCH 1/2] Adjust wording of pre-flight check messages to be clearer when presented as an AssertionError. Replaces #436. --- .../main/java/org/testcontainers/DockerClientFactory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/testcontainers/DockerClientFactory.java b/core/src/main/java/org/testcontainers/DockerClientFactory.java index 51d26695eee..ef0edab403c 100644 --- a/core/src/main/java/org/testcontainers/DockerClientFactory.java +++ b/core/src/main/java/org/testcontainers/DockerClientFactory.java @@ -142,7 +142,7 @@ public boolean matches(Object o) { @Override public void describeTo(Description description) { - description.appendText("is newer than 1.6.0"); + description.appendText("should be at least 1.6.0"); } }); } @@ -162,7 +162,7 @@ private void checkDiskSpace(DockerClient dockerClient, String id) { DiskSpaceUsage df = parseAvailableDiskSpace(outputStream.toString()); VisibleAssertions.assertTrue( - "Docker environment has more than 2GB free", + "Docker environment should have more than 2GB free disk space", df.availableMB.map(it -> it >= 2048).orElse(true) ); } @@ -187,7 +187,7 @@ private void checkExposedPort(String hostIpAddress, DockerClient dockerClient, S } catch (IOException e) { response = e.getMessage(); } - VisibleAssertions.assertEquals("Exposed port is accessible", "hello", response); + VisibleAssertions.assertEquals("A port exposed by a docker container should be accessible", "hello", response); } /** From 7f1522ee029910148cf58dd9f9eaddf81009a15b Mon Sep 17 00:00:00 2001 From: Richard North Date: Mon, 18 Sep 2017 21:53:44 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b348b289fc1..7b67bb5e45e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. ### Changed - Load `DockerClientProviderStrategy` via Service Loader (#434, #435) - Make it possible to specify docker compose container in configuration (#422, #425) +- Clarify wording of pre-flight check messages (#457, #436) ## [1.4.2] - 2017-07-25