fix(tests): update tests for watchdog refactoring

heal_suppression.sh:
- claim/release_root_cause -> wan_repair_until/singbox_repair_until
- suppressed_by_root_cause(healer, priority) -> (healer)
- driver updated to use new two-var API

heal_outcome.sh:
- watch_recovery(key, recovery_event, incident, reason) -> (key, incident, reason)
- add check that reason: field still present

heal_dns_idempotent.sh:
- replace ai_enabled mock with settings() mock
- fix suppressed_by_root_cause to single-arg signature
- fix ucode // comment (was #)
This commit is contained in:
Dushnilin
2026-08-11 11:16:25 +03:00
parent 1bf1af3783
commit 188a1b4fe8
3 changed files with 53 additions and 51 deletions
+3 -3
View File
@@ -51,12 +51,12 @@ let noresolv = "";
function as_string(v) { return "" + v; }
function system(cmd) { push(ran, cmd); return 0; }
function ai_enabled(key, dflt) { return true; }
function suppressed_by_root_cause(healer, priority) { return false; }
// ai_enabled() was removed; heal_dns_continuous now reads settings() directly.
function settings() { return {}; }
function suppressed_by_root_cause(healer) { return false; }
function ai_heal_report(t, d, r, outcome) { push(reports, outcome); }
let uci_core = { get: function(path) { return path == "dhcp.@dnsmasq[0].noresolv" ? noresolv : ""; } };
let controller = { reset_dns_consecutive: function() { resets++; } };
const PRIORITY_DNS = 50;
PRELUDE
awk '