mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-23 14:22:38 +00:00
fix: Notify systemd for start, stop, watchdog (#20482)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
1 parent
032557b1db
commit
97eac16aaf
5 files changed
+56
-1
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user