From 89f1d12b64e0d79d8460e8a08901219cacd950c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Menou?= Date: Wed, 25 Sep 2024 13:57:56 +0200 Subject: [PATCH] Silence des warnings du mix.lock (#4224) --- apps/transport/test/build_test.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/transport/test/build_test.exs b/apps/transport/test/build_test.exs index 3786223d38..8c4c8c0a25 100644 --- a/apps/transport/test/build_test.exs +++ b/apps/transport/test/build_test.exs @@ -1,5 +1,6 @@ defmodule TransportWeb.BuildTest do use ExUnit.Case + import ExUnit.CaptureIO def tool_versions do File.read!("../../.tool-versions") @@ -40,7 +41,8 @@ defmodule TransportWeb.BuildTest do # The test has to take the git-stored version of `mix.lock` and assert on its content, # because the CI doesn't run ARM and `mix deps.get` will overwrite `mix.lock` at the moment {output, 0} = System.cmd("git", ["show", "HEAD:../../mix.lock"]) - {%{rambo: rambo}, []} = output |> Code.eval_string() + {{%{rambo: rambo}, []}, _log} = with_io(:stderr, fn -> Code.eval_string(output) end) + # if this test fails, it may be because someone with a Mac M1 unintentionally committed `mix.lock` change # related to a Rambo-tweak, see https://github.com/etalab/transport-site/blob/61eabf185e71b7670e5d750048714636f85c5e58/apps/transport/mix.exs#L99-L111 assert rambo |> elem(0) == :hex