Allow docker image used for selenium to be specified#249
Conversation
…ys trying to figure out from classpath dependencies. Refs #171
| public SELF withDesiredCapabilities(DesiredCapabilities desiredCapabilities) { | ||
| super.setDockerImageName(getImageForCapabilities(desiredCapabilities)); | ||
|
|
||
| if (! imageNameIsSet) { |
| */ | ||
| public BrowserWebDriverContainer(String dockerImageName) { | ||
| super.setDockerImageName(dockerImageName); | ||
| this.imageNameIsSet = true; |
There was a problem hiding this comment.
can't we just check that getDockerImageName() is not null?
There was a problem hiding this comment.
Unfortunately, no; GenericContainer sets a default image name (alpine:3.2) on the no-args constructor. I agree with the principle, though...
| public BrowserWebDriverContainer firefox = new BrowserWebDriverContainer("selenium/standalone-firefox-debug:2.53.1-beryllium") | ||
| .withDesiredCapabilities(DesiredCapabilities.firefox()); | ||
|
|
||
| @Test |
There was a problem hiding this comment.
сan't we just inherit this tests from BaseWebDriverContainerTest?
There was a problem hiding this comment.
The @Test methods? We've not done this yet in the other subclasses. I guess this would require making the container field be a protected member of the parent class and initialize it in the subclass constructors. Or is there a simpler way?
There was a problem hiding this comment.
you can make the parent class abstract with abstract protected BrowserWebDriverContainer getContainer() method. We were using something like that in Zipkin's tests:
https://github.com/openzipkin/zipkin/blob/master/zipkin-storage/mysql/src/test/java/zipkin/storage/mysql/MySQLTest.java
…me, and clarify name of field
|
LGTM, we can change the tests later, all-at-once |
... instead of always trying to figure out from classpath dependencies. Refs #171