feat: Add XMPP dialog in STARTTLS routine (#6508)

This commit is contained in:
Shaan
2025-12-20 12:35:53 +00:00
committed by GitHub
parent 22a0ed6061
commit f3c76dbc6f
2 changed files with 57 additions and 6 deletions
+22
View File
@@ -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);
});
});