Skip to content

Commit f977f08

Browse files
MikaAKjarlah
andauthored
fix for otp 28 (#186)
* fix for otp 28 * Update container.ex --------- Co-authored-by: Jarl André Hübenthal <jarlah@protonmail.com>
1 parent 3f79aeb commit f977f08

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

lib/container.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ defmodule Testcontainers.Container do
2323
labels: %{},
2424
auto_remove: false,
2525
container_id: nil,
26-
check_image: ~r/.*/,
26+
check_image: nil,
2727
network_mode: nil,
2828
reuse: false,
2929
force_reuse: false,
@@ -272,7 +272,7 @@ defmodule Testcontainers.Container do
272272
Check if the provided image is compatible with the expected default image.
273273
"""
274274
def valid_image(%__MODULE__{image: image, check_image: check_image} = config) do
275-
if Regex.match?(check_image, image) do
275+
if Regex.match?(check_image || ~r/.*/, image) do
276276
{:ok, config}
277277
else
278278
{:error,

lib/container/selenium_container.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,13 @@ defmodule Testcontainers.SeleniumContainer do
7272
defimpl ContainerBuilder do
7373
import Container
7474

75-
@log_regex ~r/.*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n/
76-
7775
@spec build(%SeleniumContainer{}) :: %Container{}
7876
@impl true
7977
def build(%SeleniumContainer{} = config) do
8078
new(config.image)
8179
|> with_exposed_ports([config.port1, config.port2])
8280
|> with_waiting_strategies([
83-
LogWaitStrategy.new(@log_regex, config.wait_timeout, 1000),
81+
LogWaitStrategy.new(~r/.*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n/, config.wait_timeout, 1000),
8482
PortWaitStrategy.new("127.0.0.1", config.port1, config.wait_timeout, 1000),
8583
PortWaitStrategy.new("127.0.0.1", config.port2, config.wait_timeout, 1000)
8684
])

0 commit comments

Comments
 (0)