#2404 change software state from patching to fixing to align with CAOS v0.8

This commit is contained in:
Cristian-VM2
2024-03-26 16:41:11 +00:00
parent b3c1b6b7a5
commit 5860c74ef9
8 changed files with 28 additions and 28 deletions

View File

@@ -47,4 +47,4 @@ def test_application_describe_states(application):
assert SoftwareHealthState.COMPROMISED.value == application.describe_state().get("health_state_actual")
application.fix()
assert SoftwareHealthState.PATCHING.value == application.describe_state().get("health_state_actual")
assert SoftwareHealthState.FIXING.value == application.describe_state().get("health_state_actual")

View File

@@ -86,8 +86,8 @@ def test_service_fix(service):
assert service.health_state_actual == SoftwareHealthState.GOOD
service.apply_request(["fix"])
assert service.health_state_actual == SoftwareHealthState.PATCHING
assert service.health_state_actual == SoftwareHealthState.FIXING
service.apply_timestep(1)
assert service.health_state_actual == SoftwareHealthState.PATCHING
assert service.health_state_actual == SoftwareHealthState.FIXING
service.apply_timestep(2)
assert service.health_state_actual == SoftwareHealthState.GOOD

View File

@@ -93,7 +93,7 @@ def test_restart_compromised(service):
"""
Service should be compromised even after reset.
Only way to remove compromised status is via patching.
Only way to remove compromised status is via FIXING.
"""
timestep = 0
@@ -143,7 +143,7 @@ def test_service_fixing(service):
service.set_health_state(SoftwareHealthState.COMPROMISED)
service.fix()
assert service.health_state_actual == SoftwareHealthState.PATCHING
assert service.health_state_actual == SoftwareHealthState.FIXING
for i in range(service.fixing_duration + 1):
service.apply_timestep(i)