Raise an error if we use nat and eth1 doesn't exists

Fix #657
This commit is contained in:
Julien Duponchelle committed 2016-08-30 18:27:04 +02:00
1 parent 5fdd33fe3b
commit 7065988087
2 files changed
+8 -2

No files matched your search

+3 -2
View File
@@ -322,5 +322,6 @@ def on_gns3vm():
"""
Mock the hostname to emulate the GNS3 VM
"""
with patch("socket.gethostname", return_value="gns3vm"):
yield
with patch("gns3server.utils.interfaces.interfaces", return_value=[{"name": "eth0"}, {"name": "eth1"}]):
with patch("socket.gethostname", return_value="gns3vm"):
yield