From ac055219c6af8e0dc372f3cf59aa5f554f45f44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Thu, 12 Oct 2023 19:53:40 +0200 Subject: [PATCH] rename function --- lib/reaper.ex | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/reaper.ex b/lib/reaper.ex index 5797ea5..e3548df 100644 --- a/lib/reaper.ex +++ b/lib/reaper.ex @@ -39,7 +39,7 @@ defmodule TestcontainersElixir.Reaper do # FIXME this will surely not work for all use cases Binds: ["/var/run/docker.sock:/var/run/docker.sock:rw"] }, - Env: ["RYUK_PORT=8080"] + Env: ["RYUK_PORT=#{@ryuk_port}"] } ) @@ -49,7 +49,7 @@ defmodule TestcontainersElixir.Reaper do {:ok, socket} = connection - |> create_socket(container, @ryuk_port) + |> create_ryuk_socket(container) {:ok, socket} end @@ -75,12 +75,11 @@ defmodule TestcontainersElixir.Reaper do :ok end - defp create_socket( + defp create_ryuk_socket( connection, - %DockerEngineAPI.Model.ContainerCreateResponse{Id: container_id}, - port + %DockerEngineAPI.Model.ContainerCreateResponse{Id: container_id} ) do - port_str = "#{port}/tcp" + port_str = "#{@ryuk_port}/tcp" {:ok, %DockerEngineAPI.Model.ContainerInspectResponse{