Skip to content

Commit

Permalink
Update VintageNet.Interface.*ConnectivityChecker refs
Browse files Browse the repository at this point in the history
This change will fail unit tests on projects that depend on this one and
force the `VintageNet.Interface.*ConnectivityChecker` to
`VintageNet.Connectivity.*Checker` update.
  • Loading branch information
fhunleth committed Oct 1, 2021
1 parent 7071964 commit 85a6603
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/vintage_net/ip/ipv4_config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ defmodule VintageNet.IP.IPv4Config do
]},
id: :udhcpc
),
{VintageNet.Interface.InternetConnectivityChecker, ifname}
{VintageNet.Connectivity.InternetChecker, ifname}
]

%RawConfig{
Expand Down Expand Up @@ -241,8 +241,8 @@ defmodule VintageNet.IP.IPv4Config do
# If there's a default gateway, then check for internet connectivity.
checker =
case ipv4[:gateway] do
nil -> {VintageNet.Interface.LANConnectivityChecker, ifname}
_exists -> {VintageNet.Interface.InternetConnectivityChecker, ifname}
nil -> {VintageNet.Connectivity.LANChecker, ifname}
_exists -> {VintageNet.Connectivity.InternetChecker, ifname}
end

new_child_specs = child_specs ++ [checker]
Expand Down
8 changes: 4 additions & 4 deletions test/vintage_net/ip/ipv4_config_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ defmodule VintageNet.IP.IPv4ConfigTest do
required_ifnames: ["eth0"],
child_specs: [
udhcpc_child_spec("eth0", "unit_test"),
{VintageNet.Interface.InternetConnectivityChecker, "eth0"}
{VintageNet.Connectivity.InternetChecker, "eth0"}
],
down_cmds: [
{:run_ignore_errors, "ip", ["addr", "flush", "dev", "eth0", "label", "eth0"]},
Expand Down Expand Up @@ -125,7 +125,7 @@ defmodule VintageNet.IP.IPv4ConfigTest do
source_config: input,
required_ifnames: ["eth0"],
child_specs: [
{VintageNet.Interface.InternetConnectivityChecker, "eth0"}
{VintageNet.Connectivity.InternetChecker, "eth0"}
],
down_cmds: [
{:fun, VintageNet.RouteManager, :clear_route, ["eth0"]},
Expand Down Expand Up @@ -172,7 +172,7 @@ defmodule VintageNet.IP.IPv4ConfigTest do
source_config: input,
required_ifnames: ["eth0"],
child_specs: [
{VintageNet.Interface.LANConnectivityChecker, "eth0"}
{VintageNet.Connectivity.LANChecker, "eth0"}
],
down_cmds: [
{:fun, VintageNet.RouteManager, :clear_route, ["eth0"]},
Expand Down Expand Up @@ -218,7 +218,7 @@ defmodule VintageNet.IP.IPv4ConfigTest do
source_config: input,
required_ifnames: ["eth0"],
child_specs: [
{VintageNet.Interface.LANConnectivityChecker, "eth0"}
{VintageNet.Connectivity.LANChecker, "eth0"}
],
down_cmds: [
{:fun, VintageNet.RouteManager, :clear_route, ["eth0"]},
Expand Down

0 comments on commit 85a6603

Please sign in to comment.