diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py index b099becb6..ce538d7f6 100644 --- a/gns3server/compute/qemu/qemu_vm.py +++ b/gns3server/compute/qemu/qemu_vm.py @@ -2674,7 +2674,6 @@ class QemuVM(BaseNode): command.extend(self._aux_options()) command.extend(self._monitor_options()) command.extend(await self._network_options()) - command.extend((await self._network_options())) # bios options must be last to have predictable NIC numbering, see https://github.com/GNS3/gns3-server/issues/2838 command.extend(self._bios_option()) if self.on_close != "save_vm_state": diff --git a/tests/compute/docker/test_docker_vm.py b/tests/compute/docker/test_docker_vm.py index 92aa661ab..bc722423e 100644 --- a/tests/compute/docker/test_docker_vm.py +++ b/tests/compute/docker/test_docker_vm.py @@ -1883,7 +1883,7 @@ async def test_memory(compute_project, manager): }) assert vm._cid == "e90e34656806" - +@pytest.mark.asyncio async def test_stop_exited_container_no_stop_query(vm): vm._ubridge_hypervisor = None diff --git a/tests/controller/test_import_project.py b/tests/controller/test_import_project.py index 1cd77dbf0..e0cbfa1b1 100644 --- a/tests/controller/test_import_project.py +++ b/tests/controller/test_import_project.py @@ -21,7 +21,6 @@ import uuid import json import zipfile import pytest -import aiohttp from pathlib import Path from tests.utils import asyncio_patch, AsyncioMagicMock @@ -29,6 +28,7 @@ from unittest.mock import patch, MagicMock from gns3server.utils.asyncio import aiozipstream from gns3server.controller.project import Project +from gns3server.controller.controller_error import ControllerError from gns3server.controller.export_project import export_project from gns3server.controller.import_project import import_project, _move_files_to_compute from gns3server.version import __version__ @@ -189,11 +189,12 @@ async def test_import_project_containing_absolute_symlink(controller, export_pro symlink_target = "/tmp/anywhere" zip_path = await export_project_with_symlink(symlink_target) - with pytest.raises(aiohttp.web.HTTPConflict): + with pytest.raises(ControllerError): with open(zip_path, "rb") as f: await import_project(controller, project_id, f) +@pytest.mark.asyncio async def test_import_project_containing_escaping_symlink(controller, export_project_with_symlink): """ Test importing a project containing a symlink that escapes the project directory. @@ -204,11 +205,12 @@ async def test_import_project_containing_escaping_symlink(controller, export_pro symlink_target = "../../../../symlink_target" zip_path = await export_project_with_symlink(symlink_target) - with pytest.raises(aiohttp.web.HTTPConflict): + with pytest.raises(ControllerError): with open(zip_path, "rb") as f: await import_project(controller, project_id, f) +@pytest.mark.asyncio async def test_import_upgrade(tmpdir, controller): """ Topology made for previous GNS3 version are upgraded during the process diff --git a/tests/controller/test_project.py b/tests/controller/test_project.py index c4a919b4a..d099c019a 100644 --- a/tests/controller/test_project.py +++ b/tests/controller/test_project.py @@ -713,6 +713,7 @@ async def test_delete_does_not_start_nodes(project): assert not project.start_all.called +@pytest.mark.asyncio async def test_dump(projects_dir): directory = projects_dir