Simplify check
This commit is contained in:
parent
edbc789a93
commit
8d87f0f92b
|
@ -100,8 +100,13 @@
|
|||
<artifactId>elasticsearch</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>testcontainers</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -3,6 +3,7 @@ package ca.uhn.fhir.test.utilities.docker;
|
|||
import org.junit.jupiter.api.extension.ConditionEvaluationResult;
|
||||
import org.junit.jupiter.api.extension.ExecutionCondition;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.testcontainers.DockerClientFactory;
|
||||
import org.testcontainers.elasticsearch.ElasticsearchContainer;
|
||||
|
||||
|
||||
|
@ -14,7 +15,7 @@ public class DockerRequiredCondition implements ExecutionCondition {
|
|||
@Override
|
||||
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext theExtensionContext) {
|
||||
try {
|
||||
new ElasticsearchContainer();
|
||||
DockerClientFactory.instance().isDockerAvailable();
|
||||
return ConditionEvaluationResult.enabled("Docker is installed so we can run these tests!");
|
||||
} catch (Exception e) {
|
||||
return ConditionEvaluationResult.disabled("It appears as though docker is not installed on the host machine!");
|
||||
|
|
Loading…
Reference in New Issue