mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23:25:24 +00:00
fix: host status shows online when the port answers and only warns on a failed login
This commit is contained in:
1 parent
c28cb1bfc6
commit
49acec4770
14 files changed
+141
-141
No files matched your search
@@ -154,6 +154,19 @@ describe("MetricsPoller", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("does not report a login for a connection that timed out", async () => {
|
||||
collectMetrics.mockRejectedValue(new Error("Timed out while waiting"));
|
||||
const { fake, poller } = setup();
|
||||
|
||||
poller.registerViewer(7, "viewer-a", "user-1");
|
||||
await flush();
|
||||
|
||||
expect(fake.statusReports).toEqual([]);
|
||||
expect(fake.emitted.at(-1)?.payload).toMatchObject({
|
||||
state: "unreachable",
|
||||
});
|
||||
});
|
||||
|
||||
it("marks a changed host key", async () => {
|
||||
collectMetrics.mockRejectedValue(new Error("Host key changed"));
|
||||
const { fake, poller, state } = setup();
|
||||
|
||||
Reference in new issue
Block a user