mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Fix updating packet filters
This commit is contained in:
17 files changed
+72
-37
No files matched your search
@@ -218,7 +218,8 @@ class TestDockerNodesRoutes:
|
||||
"type": "nio_udp",
|
||||
"lport": 4242,
|
||||
"rport": 4343,
|
||||
"rhost": "127.0.0.1"
|
||||
"rhost": "127.0.0.1",
|
||||
"filters": {"packet_loss": 10}
|
||||
}
|
||||
|
||||
url = app.url_path_for("compute:create_docker_node_nio",
|
||||
@@ -228,6 +229,8 @@ class TestDockerNodesRoutes:
|
||||
port_number="0")
|
||||
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"] = {}
|
||||
|
||||
url = app.url_path_for("compute:update_docker_node_nio",
|
||||
project_id=vm["project_id"],
|
||||
@@ -237,7 +240,8 @@ class TestDockerNodesRoutes:
|
||||
with asyncio_patch("gns3server.compute.docker.docker_vm.DockerVM.adapter_update_nio_binding"):
|
||||
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_docker_delete_nio(self, app: FastAPI, compute_client: AsyncClient, vm: dict) -> None:
|
||||
|
||||
|
||||
Reference in new issue
Block a user