-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
Example: $ mix deps.get Resolving Hex dependencies... Resolution completed in 0.0s Unchanged: ecto 3.3.1 ecto_sql 3.3.2 ex_doc 0.1.0 postgrex 0.2.1 warning: the following deps set `warn_if_outdated: true` and are outdated: * ecto 3.3.2 is available * ecto_sql 3.3.3 is available
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
defmodule Hex.RemoteConvergetTest do | ||
use HexTest.IntegrationCase | ||
|
||
defmodule OutdatedDepsBefore.MixProject do | ||
def project do | ||
[ | ||
app: :outdated_deps, | ||
version: "0.1.0", | ||
deps: [ | ||
{:postgrex, "0.2.1"}, | ||
{:ecto, "3.3.1"}, | ||
{:ecto_sql, "3.3.2"} | ||
] | ||
] | ||
end | ||
end | ||
|
||
defmodule OutdatedDepsAfter.MixProject do | ||
def project do | ||
[ | ||
app: :outdated_deps, | ||
version: "0.1.0", | ||
deps: [ | ||
{:postgrex, ">= 0.0.0", warn_if_outdated: true}, | ||
{:ecto, ">= 0.0.0", warn_if_outdated: true}, | ||
{:ecto_sql, ">= 0.0.0", warn_if_outdated: true} | ||
] | ||
] | ||
end | ||
end | ||
|
||
test "deps with warn_if_outdated: true" do | ||
Check failure on line 32 in test/hex/remote_converger_test.exs GitHub Actions / Test (21.3, 1.8.1)
Check failure on line 32 in test/hex/remote_converger_test.exs GitHub Actions / Test (21.3, 1.7.2)
Check failure on line 32 in test/hex/remote_converger_test.exs GitHub Actions / Test (21.3, 1.6.6)
Check failure on line 32 in test/hex/remote_converger_test.exs GitHub Actions / Test (22.3, 1.9.4)
Check failure on line 32 in test/hex/remote_converger_test.exs GitHub Actions / Test (21.3, 1.7.2)
Check failure on line 32 in test/hex/remote_converger_test.exs GitHub Actions / Test (21.3, 1.6.6)
Check failure on line 32 in test/hex/remote_converger_test.exs GitHub Actions / Test (21.3, 1.8.1)
|
||
in_tmp(fn -> | ||
Mix.Project.push(OutdatedDepsBefore.MixProject) | ||
:ok = Mix.Tasks.Deps.Get.run([]) | ||
|
||
Mix.Project.pop() | ||
Mix.Project.push(OutdatedDepsAfter.MixProject) | ||
|
||
output = | ||
ExUnit.CaptureIO.capture_io(:stderr, fn -> | ||
:ok = Mix.Tasks.Deps.Get.run([]) | ||
end) | ||
|
||
assert output =~ "ecto 3.3.2 is available" | ||
assert output =~ "ecto_sql 3.3.3 is available" | ||
refute output =~ "postgrex" | ||
end) | ||
end | ||
end |