Class DockerClassRule<T extends DockerContainer>
- java.lang.Object
-
- org.jenkinsci.test.acceptance.docker.DockerClassRule<T>
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class DockerClassRule<T extends DockerContainer> extends Object implements org.junit.rules.TestRule
Builds a Docker image before running tests, then starts containers on demand. Use withClassRule
. Compared toDockerRule
this interacts better withTimeout
, including rules likeJenkinsRule
which run that implicitly: you do not want the timeout applied to a potentially lengthydocker-build
command.
-
-
Constructor Summary
Constructors Constructor Description DockerClassRule(Class<T> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
T
create()
DockerClassRule<T>
localOnly()
-
-
-
Method Detail
-
localOnly
public DockerClassRule<T> localOnly()
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
create
public T create() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-