mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge branch '3.1' into base-configs-3.0
This commit is contained in:
40 files changed
+3093
-204
No files matched your search
@@ -63,10 +63,10 @@ class TestLinkRoutes:
|
||||
node1, node2 = nodes
|
||||
|
||||
filters = {
|
||||
"latency": [10],
|
||||
"delay": [10, 0],
|
||||
"frequency_drop": [50]
|
||||
}
|
||||
|
||||
|
||||
with asyncio_patch("gns3server.controller.udp_link.UDPLink.create") as mock:
|
||||
response = await client.post(app.url_path_for("create_link", project_id=project.id), json={
|
||||
"nodes": [
|
||||
@@ -88,7 +88,7 @@ class TestLinkRoutes:
|
||||
],
|
||||
"filters": filters
|
||||
})
|
||||
|
||||
|
||||
assert mock.called
|
||||
assert response.status_code == status.HTTP_201_CREATED
|
||||
assert response.json()["link_id"] is not None
|
||||
@@ -250,10 +250,10 @@ class TestLinkRoutes:
|
||||
) -> None:
|
||||
|
||||
filters = {
|
||||
"latency": [10],
|
||||
"delay": [10, 0],
|
||||
"frequency_drop": [50]
|
||||
}
|
||||
|
||||
|
||||
node1, node2 = nodes
|
||||
with asyncio_patch("gns3server.controller.udp_link.UDPLink.create") as mock:
|
||||
response = await client.post(app.url_path_for("create_link", project_id=project.id), json={
|
||||
@@ -315,7 +315,7 @@ class TestLinkRoutes:
|
||||
) -> None:
|
||||
|
||||
filters = {
|
||||
"latency": [10],
|
||||
"delay": [10, 0],
|
||||
"frequency_drop": [50]
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ class TestRolesPrivilegesRoutes:
|
||||
)
|
||||
assert response.status_code == status.HTTP_204_NO_CONTENT
|
||||
privileges = await rbac_repo.get_role_privileges(role_in_db.role_id)
|
||||
assert len(privileges) == 25 # 24 default privileges + 1 custom privilege
|
||||
assert len(privileges) == 27 # 25 default privileges + 2 LLMConfig privileges
|
||||
|
||||
async def test_get_role_privileges(
|
||||
self,
|
||||
@@ -143,7 +143,7 @@ class TestRolesPrivilegesRoutes:
|
||||
role_id=role_in_db.role_id)
|
||||
)
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert len(response.json()) == 25 # 24 default privileges + 1 custom privilege
|
||||
assert len(response.json()) == 27 # 25 default privileges + 2 LLMConfig privileges
|
||||
|
||||
async def test_remove_privilege_from_role(
|
||||
self,
|
||||
@@ -165,4 +165,4 @@ class TestRolesPrivilegesRoutes:
|
||||
)
|
||||
assert response.status_code == status.HTTP_204_NO_CONTENT
|
||||
privileges = await rbac_repo.get_role_privileges(role_in_db.role_id)
|
||||
assert len(privileges) == 24 # 24 default privileges
|
||||
assert len(privileges) == 26 # 26 default privileges (24 + 2 LLMConfig)
|
||||
Reference in new issue
Block a user