fix: install ping for admin diagnostics

This commit is contained in:
illusia committed 2026-09-06 15:08:19 +08:00
1 parent 3b5ce9b446
commit fc3bbd0c59
5 files changed
+17 -3

No files matched your search

+9
View File
@@ -73,3 +73,12 @@ test("admin host ping measures the route without opening a TeamSpeak client", as
assert.equal(result.packetLossPercent, 25);
assert.equal(result.latencyMs, 4);
});
test("admin host ping reports a missing runtime ping tool separately from packet loss", async () => {
const result = await pingTeamSpeakHost("203.0.113.20", {
attempts: 1,
execute: async () => { throw new Error("spawn ping ENOENT"); },
});
assert.equal(result.ok, false);
assert.equal(result.errorCode, "PING_UNAVAILABLE");
});