mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Merge branch '2.2' into 3.0
# Conflicts: # gns3server/compute/base_node.py # gns3server/compute/docker/__init__.py # gns3server/compute/qemu/qemu_vm.py # gns3server/controller/compute.py # gns3server/controller/gns3vm/virtualbox_gns3_vm.py # gns3server/controller/node.py # gns3server/controller/project.py # gns3server/crash_report.py # gns3server/handlers/api/controller/template_handler.py # gns3server/static/web-ui/index.html # gns3server/static/web-ui/main.8448c96e4facbe79a613.js # gns3server/version.py # tests/compute/iou/test_iou_vm.py # tests/compute/qemu/test_qemu_vm.py # tests/handlers/api/controller/test_template.py
This commit is contained in:
commit
1ff23348d3
23 files changed
+763
-138
No files matched your search
@@ -751,6 +751,20 @@ async def test_build_command_large_number_of_adapters(vm):
|
||||
with asyncio_patch("asyncio.create_subprocess_exec", return_value=MagicMock()):
|
||||
await vm._build_command()
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_build_command_with_virtio_net_pci_adapter(vm):
|
||||
"""
|
||||
Test virtio-net-pci adapter which has parameters speed=1000 & duplex=full hard-coded
|
||||
"""
|
||||
|
||||
vm.manager.get_qemu_version = AsyncioMagicMock(return_value="2.4.0")
|
||||
vm.adapters = 1
|
||||
vm.mac_address = "00:00:ab:0e:0f:09"
|
||||
vm._adapter_type = "virtio-net-pci"
|
||||
with asyncio_patch("asyncio.create_subprocess_exec", return_value=MagicMock()):
|
||||
cmd = await vm._build_command()
|
||||
assert "virtio-net-pci,mac=00:00:ab:0e:0f:09,speed=10000,duplex=full,netdev=gns3-0" in cmd
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_build_command_with_invalid_options(vm):
|
||||
|
||||
Reference in new issue
Block a user