Force test to pick _ip_route_linux for default_route_ipv6

This commit is contained in:
David Murphy 2021-06-02 15:30:23 -06:00 committed by Megan Wilhite
parent 790d49b5c2
commit 6202152494

View file

@ -552,8 +552,11 @@ anycast fe80:: dev ens192 table local proto kernel metric 0 pref medium
cmd_mock = MagicMock(side_effect=[mock_iproute_ipv4, mock_iproute_ipv6])
with patch.dict(network.__grains__, {"kernel": "Linux"}):
with patch.dict(network.__salt__, {"cmd.run": cmd_mock}):
self.assertListEqual(network.default_route("inet6"), [])
with patch.dict(
network.__utils__, {"path.which": MagicMock(return_value=False)}
):
with patch.dict(network.__salt__, {"cmd.run": cmd_mock}):
self.assertListEqual(network.default_route("inet6"), [])
def test_get_route(self):
"""