1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Fix tests

This commit is contained in:
grossmj 2021-08-30 13:04:24 +09:30
parent afdda427d2
commit 75bb06563a
3 changed files with 2 additions and 3 deletions

View File

@ -36,7 +36,7 @@ class Nat(Cloud):
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:
allowed_interfaces = allowed_interfaces.split(',')
if sys.platform.startswith("linux"):

View File

@ -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-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"], "qemu-system-x86_64-spice"), "version": version} not in qemus
qemus = await Qemu.binary_list(["x86"])

View File

@ -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.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
# Absolute path
assert qemu.get_abs_image_path(str(path1)) == path1