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:
Julien Duponchelle committed 2015-06-09 16:35:21 +02:00
1 parent bd4b6396a8
commit 7c7f8fe3ed
7 files changed
+38 -27

No files matched your search

+2 -2
View File
@@ -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"