Skip to content

Commit

Permalink
fixing a copy paste issue which caused lots of warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jarlah committed Oct 2, 2024
1 parent 4de425d commit 8616e87
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/docker/api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule Testcontainers.Docker.Api do
"label" => ["#{Testcontainers.Constants.container_reuse_hash_label}=#{hash}"]
} |> Jason.encode!()
case Api.Container.container_list(conn, filters: filters_json) do
{:ok, containers} ->
{:ok, containers} when is_list(containers) ->
case containers do
[] ->
{:error, :no_container}
Expand All @@ -40,12 +40,6 @@ defmodule Testcontainers.Docker.Api do

{:ok, %DockerEngineAPI.Model.ErrorResponse{} = error} ->
{:error, {:failed_to_get_container, error}}

{:error, %Tesla.Env{status: other}} ->
{:error, {:http_error, other}}

{:ok, %DockerEngineAPI.Model.ErrorResponse{} = error} ->
{:error, {:failed_to_get_container, error}}
end
end

Expand Down

0 comments on commit 8616e87

Please sign in to comment.