fix(recovery): close host112 wazuh manager loop
This commit is contained in:
@@ -126,11 +126,23 @@ def test_agent99_host112_recovery_is_allowlisted_and_independently_verified() ->
|
||||
function = source[source.index("function Convert-AgentHost112GuestReadback") :]
|
||||
function = function[: function.index("function Test-HostReachability")]
|
||||
|
||||
assert '"/usr/local/sbin/awoooi-host112-guest-readiness --check"' in function
|
||||
assert '"sudo -n /usr/local/sbin/awoooi-host112-guest-readiness --apply"' in function
|
||||
assert '"/usr/local/sbin/awoooi-host112-guest-readiness --check --trace-id $effectiveTraceId --run-id $effectiveRunId --work-item-id $effectiveWorkItemId"' in function
|
||||
assert '"sudo -n /usr/local/sbin/awoooi-host112-guest-readiness --apply --trace-id $effectiveTraceId --run-id $effectiveRunId --work-item-id $effectiveWorkItemId"' in function
|
||||
assert function.count("Invoke-HostSshText $targetHost $checkCommand") == 2
|
||||
assert 'schemaVersion = "agent99_host112_guest_recovery_v1"' in function
|
||||
assert 'verifier = "forced_command_host112_guest_readiness_check"' in function
|
||||
assert 'schemaVersion = "agent99_host112_guest_recovery_v2"' in function
|
||||
assert '$before.managerPreflightStatus -eq "ready"' in function
|
||||
assert '$before.transportOk -and' in function
|
||||
assert '$before.identityMatches -and' in function
|
||||
assert "Invoke-HostSshText $targetHost $applyCommand 590 1" in function
|
||||
assert 'receiptStatus -eq "written"' in function
|
||||
assert 'verifier = "wazuh_manager_service_process_agent_event_1514_enrollment_1515_and_api_55000"' in function
|
||||
for verifier_field in (
|
||||
"wazuhAnalysisdProcessCount",
|
||||
"wazuhAgentEventPort1514Ready",
|
||||
"wazuhAgentEnrollmentPort1515Tcp",
|
||||
"wazuhManagerApiPort55000Tcp",
|
||||
):
|
||||
assert verifier_field in function
|
||||
for forbidden in ("host_reboot", "vm_power_change", "vm_reset", "secret_read"):
|
||||
assert f'"{forbidden}"' in function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user