mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Fix ethernet interfaces tests if eth0 doesn't exists
Also on Windows and MacOS it return error if we try to use a non existing interfaces. Fix #230
This commit is contained in:
1 parent
bd4b6396a8
commit
7c7f8fe3ed
7 files changed
+38
-27
No files matched your search
@@ -150,9 +150,9 @@ def test_add_nio_binding_udp(vm):
|
||||
assert nio.lport == 4242
|
||||
|
||||
|
||||
def test_add_nio_binding_tap(vm):
|
||||
def test_add_nio_binding_tap(vm, ethernet_device):
|
||||
with patch("gns3server.modules.base_manager.BaseManager._has_privileged_access", return_value=True):
|
||||
nio = VPCS.instance().create_nio(vm.vpcs_path, {"type": "nio_tap", "tap_device": "test"})
|
||||
nio = VPCS.instance().create_nio(vm.vpcs_path, {"type": "nio_tap", "tap_device": ethernet_device})
|
||||
vm.port_add_nio_binding(0, nio)
|
||||
assert nio.tap_device == "test"
|
||||
|
||||
|
||||
Reference in new issue
Block a user