mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Fix updating packet filters
This commit is contained in:
17 files changed
+72
-37
No files matched your search
@@ -344,7 +344,8 @@ class TestQemuNodesRoutes:
|
||||
"type": "nio_udp",
|
||||
"lport": 4242,
|
||||
"rport": 4343,
|
||||
"rhost": "127.0.0.1"
|
||||
"rhost": "127.0.0.1",
|
||||
"filters": {"packet_loss": 10}
|
||||
}
|
||||
|
||||
await compute_client.put(
|
||||
@@ -360,9 +361,11 @@ class TestQemuNodesRoutes:
|
||||
port_number="0"
|
||||
)
|
||||
|
||||
await compute_client.post(url, json=params)
|
||||
params["filters"] = {}
|
||||
|
||||
response = await compute_client.post(url, json=params)
|
||||
assert response.status_code == status.HTTP_201_CREATED
|
||||
assert response.json()["filters"] == {"packet_loss": 10}
|
||||
params["filters"].clear()
|
||||
|
||||
url = app.url_path_for(
|
||||
"compute:update_qemu_node_nio",
|
||||
project_id=qemu_vm["project_id"],
|
||||
@@ -373,6 +376,7 @@ class TestQemuNodesRoutes:
|
||||
response = await compute_client.put(url, json=params)
|
||||
assert response.status_code == status.HTTP_201_CREATED
|
||||
assert response.json()["type"] == "nio_udp"
|
||||
assert response.json()["filters"] == {}
|
||||
|
||||
|
||||
async def test_qemu_delete_nio(self, app: FastAPI, compute_client: AsyncClient, qemu_vm: dict) -> None:
|
||||
|
||||
Reference in new issue
Block a user