mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Add UEFI boot mode option for Qemu VMs
This commit is contained in:
1 parent
e5eeab662e
commit
40c265152b
6 files changed
+51
No files matched your search
@@ -390,6 +390,25 @@ async def test_bios_option(vm, tmpdir, fake_qemu_img_binary):
|
||||
assert ' '.join(['-bios', str(tmpdir / "test.img")]) in ' '.join(options)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_uefi_boot_mode_option(vm, tmpdir, fake_qemu_img_binary):
|
||||
|
||||
vm.manager.get_qemu_version = AsyncioMagicMock(return_value="3.1.0")
|
||||
vm._uefi = True
|
||||
options = await vm._build_command()
|
||||
assert ' '.join(['-bios', 'OVMF.fd']) in ' '.join(options)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_uefi_with_bios_image_already_configured(vm, tmpdir, fake_qemu_img_binary):
|
||||
|
||||
vm.manager.get_qemu_version = AsyncioMagicMock(return_value="3.1.0")
|
||||
vm._bios_image = str(tmpdir / "test.img")
|
||||
vm._uefi = True
|
||||
with pytest.raises(QemuError):
|
||||
await vm._build_command()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_vnc_option(vm, fake_qemu_img_binary):
|
||||
|
||||
|
||||
Reference in new issue
Block a user