fix(monitoring): select kali identity for host112
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 9m11s
CD Pipeline / build-and-deploy (push) Successful in 14m36s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 2s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 15s
CD Pipeline / post-deploy-checks (push) Successful in 2m26s

This commit is contained in:
ogt
2026-07-15 08:01:16 +08:00
parent 22885df82d
commit 97c111bc75
3 changed files with 5 additions and 3 deletions

View File

@@ -65,7 +65,9 @@ def test_host_memory_pressure_is_not_mislabeled_as_oom_or_host_188() -> None:
assert rule["labels"]["layer"] == "systemd-{{ $labels.host }}"
assert rule["labels"]["auto_repair"] == "true"
assert "不代表已發生 OOM" in annotations["description"]
assert annotations["auto_repair_action"].startswith("ssh 192.168.0.{{ $labels.host }} ")
assert annotations["auto_repair_action"].startswith(
'ssh {{ if eq $labels.host "112" }}kali@{{ end }}192.168.0.{{ $labels.host }} '
)
assert "{{ $labels.instance }}" not in annotations["auto_repair_action"]
assert "oom_kill" in annotations["auto_repair_action"]
assert "drop_caches" not in annotations["auto_repair_action"]