mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 08:48:11 +00:00
Fix tests
This commit is contained in:
parent
afdda427d2
commit
75bb06563a
@ -36,7 +36,7 @@ class Nat(Cloud):
|
|||||||
|
|
||||||
def __init__(self, name, node_id, project, manager, ports=None):
|
def __init__(self, name, node_id, project, manager, ports=None):
|
||||||
|
|
||||||
allowed_interfaces = Config.instance().get_section_config("Server").get("allowed_interfaces", None)
|
allowed_interfaces = Config.instance().settings.Server.allowed_interfaces
|
||||||
if allowed_interfaces:
|
if allowed_interfaces:
|
||||||
allowed_interfaces = allowed_interfaces.split(',')
|
allowed_interfaces = allowed_interfaces.split(',')
|
||||||
if sys.platform.startswith("linux"):
|
if sys.platform.startswith("linux"):
|
||||||
|
@ -73,7 +73,6 @@ async def test_binary_list(monkeypatch, tmpdir):
|
|||||||
assert {"path": os.path.join(os.environ["PATH"], "qemu-kvm"), "version": version} in qemus
|
assert {"path": os.path.join(os.environ["PATH"], "qemu-kvm"), "version": version} in qemus
|
||||||
assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x42"), "version": version} in qemus
|
assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x42"), "version": version} in qemus
|
||||||
assert {"path": os.path.join(os.environ["PATH"], "hello"), "version": version} not in qemus
|
assert {"path": os.path.join(os.environ["PATH"], "hello"), "version": version} not in qemus
|
||||||
assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x86_64-spice"), "version": version} not in qemus
|
|
||||||
|
|
||||||
qemus = await Qemu.binary_list(["x86"])
|
qemus = await Qemu.binary_list(["x86"])
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ def test_get_abs_image_recursive_ova(qemu, tmpdir, config):
|
|||||||
config.settings.Server.images_path = str(tmpdir / "images1")
|
config.settings.Server.images_path = str(tmpdir / "images1")
|
||||||
config.settings.Server.local = False
|
config.settings.Server.local = False
|
||||||
|
|
||||||
assert qemu.get_abs_image_path("test.ova/test1.bin") == path1
|
assert qemu.get_abs_image_path("demo/test.ova/test1.bin") == path1
|
||||||
assert qemu.get_abs_image_path("test.ova/test2.bin") == path2
|
assert qemu.get_abs_image_path("test.ova/test2.bin") == path2
|
||||||
# Absolute path
|
# Absolute path
|
||||||
assert qemu.get_abs_image_path(str(path1)) == path1
|
assert qemu.get_abs_image_path(str(path1)) == path1
|
||||||
|
Loading…
Reference in New Issue
Block a user