mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Allow projects containing missing images to open in a degraded state instead of failing to load
This commit is contained in:
1 parent
de8e1039a9
commit
59a367b88d
8 files changed
+923
-18
No files matched your search
@@ -103,7 +103,20 @@ class TestNodeRoutes:
|
||||
response = await client.get(app.url_path_for("get_nodes", project_id=project.id))
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert response.json()[0]["name"] == "test"
|
||||
async def test_list_node_with_missing_image(
|
||||
self, app: FastAPI, client: AsyncClient, project: Project, node: Node
|
||||
) -> None:
|
||||
node._missing_images = [
|
||||
{"property": "path", "image": "i86bi-linux-l2.bin", "image_type": "iou"}
|
||||
]
|
||||
|
||||
response = await client.get(app.url_path_for("get_nodes", project_id=project.id))
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
data = response.json()[0]
|
||||
assert data["missing_image"] is True
|
||||
assert data["missing_images"] == [
|
||||
{"property": "path", "image": "i86bi-linux-l2.bin", "image_type": "iou"}
|
||||
]
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"tags, expected_match",
|
||||
|
||||
Reference in new issue
Block a user