fix: Notify systemd for start, stop, watchdog (#20482)

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
chrthiandKoen Kanters authored and GitHub committed 2024-01-21 21:49:17 +01:00
1 parent 032557b1db
commit 97eac16aaf
5 files changed
+56 -1

No files matched your search

+11
View File
@@ -1,3 +1,4 @@
process.env.NOTIFY_SOCKET = "mocked";
const data = require('./stub/data');
const logger = require('./stub/logger');
const zigbeeHerdsman = require('./stub/zigbeeHerdsman');
@@ -16,6 +17,16 @@ const mocksClear = [
const fs = require('fs');
jest.mock('sd-notify', () => {
return {
watchdogInterval: () => {return 3000;},
startWatchdogMode: (interval) => {},
stopWatchdogMode: () => {},
ready: () => {},
stopping: () => {},
};
}, {virtual: true});
describe('Controller', () => {
let controller;
let mockExit;