diff --git a/server/monitor-types/system-service.js b/server/monitor-types/system-service.js index 9ed493e97..e7cdc591c 100644 --- a/server/monitor-types/system-service.js +++ b/server/monitor-types/system-service.js @@ -1,7 +1,7 @@ const { MonitorType } = require("./monitor-type"); const { execFile } = require("child_process"); const process = require("process"); -const { DOWN, UP } = require("../../src/util"); +const { UP } = require("../../src/util"); class SystemServiceMonitorType extends MonitorType { name = "system-service"; diff --git a/test/backend-test/test-system-service.js b/test/backend-test/test-system-service.js index 93e58e080..742afc9a2 100644 --- a/test/backend-test/test-system-service.js +++ b/test/backend-test/test-system-service.js @@ -20,20 +20,15 @@ if (process.platform === "linux") { } } +const shouldRun = isWindows || isSystemd; + // With Linux and no Systemd (ARM64), the test is skipped. if (process.platform === "linux" && !isSystemd) { console.log("::warning title=Systemd Missing::Linux environment detected without systemd (PID 1)."); console.log("Skipping System Service test for ARM64 runner or containers."); - process.exit(0); -} - -// If neither Windows nor Systemd-Linux, skip (e.g. MacOS) -if (!isWindows && !isSystemd) { - console.log("Skipping System Service test: Platform not supported (Mac/BSD)."); - process.exit(0); } -describe("SystemServiceMonitorType", () => { +describe("SystemServiceMonitorType", { skip: !shouldRun }, () => { let monitorType; let heartbeat; let originalPlatform;