#2682 Backport changes to core PrimAITE

This commit is contained in:
Marek Wolan
2024-06-25 11:04:52 +01:00
parent 4a81dc3b2c
commit 28dabad66b
52 changed files with 456 additions and 296 deletions

View File

@@ -45,5 +45,7 @@ def test_basic_config():
client_3: Computer = network.get_node_by_hostname("client_3")
assert client_3.operating_state == NodeOperatingState.OFF
# Bandwidth should have non-default values
for link in network.links:
assert network.links[link].bandwidth == 200

View File

@@ -123,7 +123,7 @@ def test_router_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, Prox
action = (
"ROUTER_ACL_ADDRULE",
{
"target_router_nodename": "router",
"target_router": "router",
"position": 4, # 4th rule
"permission": 2, # DENY
"source_ip_id": 3, # 10.0.1.2 (client_1)
@@ -150,7 +150,7 @@ def test_router_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, Prox
action = (
"ROUTER_ACL_ADDRULE",
{
"target_router_nodename": "router",
"target_router": "router",
"position": 5, # 5th rule
"permission": 2, # DENY
"source_ip_id": 5, # 10.0.2.2 (server_1)
@@ -188,7 +188,7 @@ def test_router_acl_removerule_integration(game_and_agent: Tuple[PrimaiteGame, P
action = (
"ROUTER_ACL_REMOVERULE",
{
"target_router_nodename": "router",
"target_router": "router",
"position": 3, # 4th rule
},
)

View File

@@ -21,7 +21,9 @@ def test_successful_node_file_system_creation_request(example_network):
client_1 = example_network.get_node_by_hostname("client_1")
assert client_1.file_system.get_file(folder_name="root", file_name="test.txt") is None
response = example_network.apply_request(["node", "client_1", "file_system", "create", "file", "", "test.txt"])
response = example_network.apply_request(
["node", "client_1", "file_system", "create", "file", "", "test.txt", "false"]
)
assert response
assert client_1.file_system.get_file(folder_name="root", file_name="test.txt")