fix(agent): repair host110 check-mode inputs

This commit is contained in:
ogt
2026-07-14 18:04:29 +08:00
parent f5cea35ad1
commit 9eb68c84ef
4 changed files with 20 additions and 4 deletions

View File

@@ -66,6 +66,12 @@ def test_host_pressure_playbook_is_bounded_and_read_only() -> None:
payload = yaml.safe_load(PLAYBOOK.read_text(encoding="utf-8"))
text = PLAYBOOK.read_text(encoding="utf-8")
catalog = get_ansible_catalog_item("ansible:110-host-pressure-readonly")
gitea_probe = next(
task
for task in payload[0]["tasks"]
if task["name"] == "Run the Gitea rate probe when selected by the controller"
)
gitea_probe_argv = gitea_probe["ansible.builtin.command"]["argv"]
assert payload[0]["hosts"] == "host_110"
assert payload[0]["become"] is False
@@ -74,6 +80,8 @@ def test_host_pressure_playbook_is_bounded_and_read_only() -> None:
assert catalog["no_write_only"] is True
assert "host-sustained-load-controller.py" in text
assert "gitea-queue-hook-backlog-playbook.py" in text
assert "--script-dir" not in gitea_probe_argv
assert "--metrics-rate-sample-seconds" not in gitea_probe_argv
for forbidden in (
"systemctl restart",
"docker restart",

View File

@@ -68,3 +68,12 @@ def test_api_image_copies_product_manifest() -> None:
assert "!.gitea/workflows/\n" in dockerignore_text
assert "!.gitea/workflows/*.yaml\n" in dockerignore_text
assert "!.gitea/workflows/*.yml\n" in dockerignore_text
assert "!scripts/reboot-recovery/\n" in dockerignore_text
assert (
"!scripts/reboot-recovery/full-stack-cold-start-check.sh\n"
in dockerignore_text
)
assert (
"!scripts/reboot-recovery/cold-start-textfile-exporter.sh\n"
in dockerignore_text
)