#2404 rename software patch to fix

This commit is contained in:
Cristian-VM2
2024-03-26 10:51:33 +00:00
parent 600dc3f016
commit 944b248300
22 changed files with 64 additions and 66 deletions

View File

@@ -65,9 +65,9 @@ def test_node_service_scan_integration(game_and_agent: Tuple[PrimaiteGame, Proxy
assert svc.health_state_visible == SoftwareHealthState.COMPROMISED
def test_node_service_patch_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]):
def test_node_service_fix_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]):
"""
Test that the NodeServicePatchAction can form a request and that it is accepted by the simulation.
Test that the NodeServiceFixAction can form a request and that it is accepted by the simulation.
When you initiate a patch action, the software health state turns to PATCHING, then after a few steps, it goes
to GOOD.
@@ -79,7 +79,7 @@ def test_node_service_patch_integration(game_and_agent: Tuple[PrimaiteGame, Prox
svc.health_state_actual = SoftwareHealthState.COMPROMISED
# 2: Apply a patch action
action = ("NODE_SERVICE_PATCH", {"node_id": 1, "service_id": 0})
action = ("NODE_SERVICE_FIX", {"node_id": 1, "service_id": 0})
agent.store_action(action)
game.step()

View File

@@ -23,7 +23,7 @@ def test_successful_application_requests(example_network):
resp_1 = net.apply_request(["node", "client_1", "application", "TestApplication", "scan"])
assert resp_1 == RequestResponse(status="success", data={})
resp_2 = net.apply_request(["node", "client_1", "application", "TestApplication", "patch"])
resp_2 = net.apply_request(["node", "client_1", "application", "TestApplication", "fix"])
assert resp_2 == RequestResponse(status="success", data={})
resp_3 = net.apply_request(["node", "client_1", "application", "TestApplication", "compromise"])
assert resp_3 == RequestResponse(status="success", data={})
@@ -46,7 +46,7 @@ def test_successful_service_requests(example_network):
"resume",
"compromise",
"scan",
"patch",
"fix",
]:
resp_1 = net.apply_request(["node", "server_1", "service", "TestService", verb])
assert resp_1 == RequestResponse(status="success", data={})