use of org.testcontainers.images.AbstractImagePullPolicy in project testcontainers-java by testcontainers.
the class OutOfPackageImagePullPolicyTest method shouldSupportCustomPoliciesOutOfTestContainersPackage.
@Test
public void shouldSupportCustomPoliciesOutOfTestContainersPackage() {
try (GenericContainer<?> container = new GenericContainer<>(TINY_IMAGE).withImagePullPolicy(new AbstractImagePullPolicy() {
@Override
protected boolean shouldPullCached(DockerImageName imageName, ImageData localImageData) {
return false;
}
})) {
container.withStartupCheckStrategy(new OneShotStartupCheckStrategy());
container.start();
}
}
Aggregations