-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting issue?
*/ | ||
public BrowserWebDriverContainer(String dockerImageName) { | ||
super.setDockerImageName(dockerImageName); | ||
this.imageNameIsSet = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we just check that getDockerImageName()
is not null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сan't we just inherit this tests from BaseWebDriverContainerTest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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