fix: tests after merging

This commit is contained in:
grossmj committed 2026-08-08 16:50:19 +02:00
1 parent dff79f65d3
commit 544d15c87e
4 files changed
+7 -5

No files matched your search

+1 -1
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
+5 -3
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
+1
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