mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 23:55:23 +00:00
feat: unify alerts into one plugin, channels, rules and inbox
This commit is contained in:
1 parent
fbe736bc20
commit
7c02daccf4
129 files changed
+20957
-2687
No files matched your search
@@ -176,6 +176,23 @@ describe("scheduled renewal", () => {
|
||||
await vi.waitFor(() => expect(mock.tls.renewers).toBe(0));
|
||||
});
|
||||
|
||||
it("alerts every admin when a renewal fails", async () => {
|
||||
const { mock, runner } = await setup({ settings: CONFIGURED });
|
||||
issue.mockRejectedValueOnce(new Error("rate limited"));
|
||||
expect(await runner.check()).toBe(false);
|
||||
expect(mock.notifications).toEqual([
|
||||
{
|
||||
actor: undefined,
|
||||
notification: expect.objectContaining({
|
||||
body: "rate limited",
|
||||
severity: "critical",
|
||||
category: "acme-ssl.renewal_failed",
|
||||
audience: "admins",
|
||||
}),
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("waits before retrying after a failed attempt", async () => {
|
||||
const { mock, runner } = await setup({ settings: CONFIGURED });
|
||||
issue.mockRejectedValueOnce(new Error("rate limited"));
|
||||
|
||||
Reference in new issue
Block a user