fix: tests after merging

This commit is contained in:
grossmj 2026-08-08 16:50:19 +02:00
parent dff79f65d3
commit 544d15c87e
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7
4 changed files with 7 additions and 5 deletions

View File

@ -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":

View File

@ -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

View File

@ -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

View File

@ -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