mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 14:31:13 +02:00
Merge pull request #2635 from yueguobin/fix/iou-suspend-405
fix(iou): return 405 error for unsupported suspend operation
This commit is contained in:
13 files changed
+204
-67
No files matched your search
@@ -326,9 +326,10 @@ class TestEthernetSwitchNodesRoutes:
|
||||
app.url_path_for(
|
||||
"compute:start_ethernet_switch",
|
||||
project_id=ethernet_switch["project_id"],
|
||||
node_id=ethernet_switch["node_id"])
|
||||
node_id=ethernet_switch["node_id"]
|
||||
)
|
||||
)
|
||||
assert response.status_code == status.HTTP_204_NO_CONTENT
|
||||
assert response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED
|
||||
|
||||
|
||||
async def test_ethernet_switch_stop(
|
||||
@@ -341,9 +342,10 @@ class TestEthernetSwitchNodesRoutes:
|
||||
app.url_path_for(
|
||||
"compute:stop_ethernet_switch",
|
||||
project_id=ethernet_switch["project_id"],
|
||||
node_id=ethernet_switch["node_id"])
|
||||
node_id=ethernet_switch["node_id"]
|
||||
)
|
||||
)
|
||||
assert response.status_code == status.HTTP_204_NO_CONTENT
|
||||
assert response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED
|
||||
|
||||
|
||||
async def test_ethernet_switch_suspend(
|
||||
@@ -356,9 +358,10 @@ class TestEthernetSwitchNodesRoutes:
|
||||
app.url_path_for(
|
||||
"compute:suspend_ethernet_switch",
|
||||
project_id=ethernet_switch["project_id"],
|
||||
node_id=ethernet_switch["node_id"])
|
||||
node_id=ethernet_switch["node_id"]
|
||||
)
|
||||
)
|
||||
assert response.status_code == status.HTTP_204_NO_CONTENT
|
||||
assert response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED
|
||||
|
||||
|
||||
async def test_ethernet_switch_reload(
|
||||
@@ -371,9 +374,10 @@ class TestEthernetSwitchNodesRoutes:
|
||||
app.url_path_for(
|
||||
"compute:reload_ethernet_switch",
|
||||
project_id=ethernet_switch["project_id"],
|
||||
node_id=ethernet_switch["node_id"])
|
||||
node_id=ethernet_switch["node_id"]
|
||||
)
|
||||
)
|
||||
assert response.status_code == status.HTTP_204_NO_CONTENT
|
||||
assert response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED
|
||||
|
||||
|
||||
async def test_ethernet_switch_create_udp(
|
||||
|
||||
Reference in new issue
Block a user