mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix VBoxManage fails if VM has specific special characters in name. Fixes #2739
This commit is contained in:
1 parent
e00bde51da
commit
dd211bce52
4 files changed
+41
-25
No files matched your search
@@ -74,7 +74,7 @@ def test_vboxmanage_path(manager, tmpdir):
|
||||
def test_list_vms(manager, loop):
|
||||
vm_list = ['"Windows 8.1" {27b4d095-ff5f-4ac4-bb9d-5f2c7861c1f1}',
|
||||
'"Carriage',
|
||||
'Return" {27b4d095-ff5f-4ac4-bb9d-5f2c7861c1f1}',
|
||||
'Return" {27b4d095-ff5f-4ac4-bb9d-5f2c7861c3f3}',
|
||||
'',
|
||||
'"<inaccessible>" {42b4d095-ff5f-4ac4-bb9d-5f2c7861c1f1}',
|
||||
'"Linux Microcore 4.7.1" {ccd8c50b-c172-457d-99fa-dd69371ede0e}']
|
||||
@@ -83,9 +83,10 @@ def test_list_vms(manager, loop):
|
||||
if cmd == "list":
|
||||
return vm_list
|
||||
else:
|
||||
if args[0] == "Windows 8.1":
|
||||
print(args)
|
||||
if args[0] == "27b4d095-ff5f-4ac4-bb9d-5f2c7861c1f1":
|
||||
return ["memory=512"]
|
||||
elif args[0] == "Linux Microcore 4.7.1":
|
||||
elif args[0] == "ccd8c50b-c172-457d-99fa-dd69371ede0e":
|
||||
return ["memory=256"]
|
||||
assert False, "Unknow {} {}".format(cmd, args)
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ def test_rename_vmname(project, manager, async_run):
|
||||
def test_vm_valid_virtualbox_api_version(loop, project, manager):
|
||||
with asyncio_patch("gns3server.compute.virtualbox.VirtualBox.execute", return_value=["API version: 4_3"]):
|
||||
vm = VirtualBoxVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", project, manager, "test", False)
|
||||
vm._uuid = "00010203-0405-0607-0809-0a0b0c0d0e0f"
|
||||
loop.run_until_complete(asyncio.ensure_future(vm.create()))
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user