fix(agent99): verify host112 and dynamic replicas
This commit is contained in:
@@ -132,6 +132,7 @@ def test_agent99_host112_recovery_is_allowlisted_and_independently_verified() ->
|
||||
assert "/usr/local/sbin/awoooi-host112-guest-readiness --check --trace-id {0} --run-id {1} --work-item-id {2}" in function
|
||||
assert "sudo -n /usr/local/sbin/awoooi-host112-guest-readiness --dry-run --trace-id {0} --run-id {1} --work-item-id {2}" in function
|
||||
assert "sudo -n /usr/local/sbin/awoooi-host112-guest-readiness --apply --trace-id {0} --run-id {1} --work-item-id {2}" in function
|
||||
assert function.count("printf ''executor_exit_code=%s\\n''") == 3
|
||||
assert function.count("Invoke-AgentHost112SshText $checkCommand") == 2
|
||||
assert function.count("Invoke-AgentHost112SshText $dryRunCommand") == 2
|
||||
assert 'schemaVersion = "agent99_host112_guest_recovery_v3"' in function
|
||||
@@ -162,6 +163,20 @@ def test_agent99_host112_recovery_is_allowlisted_and_independently_verified() ->
|
||||
assert f'"{forbidden}"' in function
|
||||
|
||||
|
||||
def test_agent99_awoooi_readback_uses_dynamic_replica_counts_without_raw_specs() -> None:
|
||||
source = CONTROL.read_text(encoding="utf-8")
|
||||
parser = source[source.index("function Convert-AgentAwoooDeploymentReadback") :]
|
||||
parser = parser[: parser.index("function Find-Vmrun")]
|
||||
|
||||
assert "custom-columns=NAME:.metadata.name,DESIRED:.spec.replicas" in parser
|
||||
assert 'requiredNames = @("awoooi-api", "awoooi-web", "awoooi-worker")' in parser
|
||||
assert "$numbers[2] -eq $numbers[0]" in parser
|
||||
assert "$numbers[3] -eq $numbers[0]" in parser
|
||||
assert "rawDeploymentSpecRead = $false" in parser
|
||||
assert "secretValueRead = $false" in parser
|
||||
assert "deployment.apps/awoooi-api\\s+1/1" not in parser
|
||||
|
||||
|
||||
def test_agent99_99_config_has_bounded_transport_and_recovery_defaults() -> None:
|
||||
config = json.loads((ROOT / "agent99.config.99.example.json").read_text())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user