mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 09:13:21 +00:00
feat: Add XMPP dialog in STARTTLS routine (#6508)
This commit is contained in:
@@ -185,4 +185,26 @@ describe("TCP Monitor", () => {
|
||||
regex
|
||||
);
|
||||
});
|
||||
test("XMPP server with valid certificate (STARTTLS)", async t => {
|
||||
const tcpMonitor = new TCPMonitorType();
|
||||
|
||||
const monitor = {
|
||||
hostname: "xmpp.earth",
|
||||
port: 5222,
|
||||
smtpSecurity: "starttls",
|
||||
isEnabledExpiryNotification: () => true,
|
||||
handleTlsInfo: async tlsInfo => {
|
||||
return tlsInfo;
|
||||
},
|
||||
};
|
||||
|
||||
const heartbeat = {
|
||||
msg: "",
|
||||
status: PENDING,
|
||||
};
|
||||
|
||||
await tcpMonitor.check(monitor, heartbeat, {});
|
||||
|
||||
assert.strictEqual(heartbeat.status, UP);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user