From 044d1863d0e36f50ea8b249af7ac4666d57a12b7 Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Mon, 18 May 2026 00:47:05 -0400 Subject: [PATCH] test: skip insaits monitor subprocesses without python --- tests/hooks/insaits-security-monitor.test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/hooks/insaits-security-monitor.test.js b/tests/hooks/insaits-security-monitor.test.js index e1bfb2b1..01b7b0be 100644 --- a/tests/hooks/insaits-security-monitor.test.js +++ b/tests/hooks/insaits-security-monitor.test.js @@ -75,7 +75,7 @@ function readAudit(root) { function runMonitor(options = {}) { if (!PYTHON) { - throw new Error('Python 3 is required for insaits-security-monitor.py tests'); + throw new Error('Python 3 was expected to be available for this test run'); } const tempDir = createTempDir(); @@ -119,6 +119,12 @@ function test(name, fn) { function runTests() { console.log('\n=== Testing insaits-security-monitor.py ===\n'); + if (!PYTHON) { + console.log(' SKIP Python 3 not found; insaits-security-monitor.py subprocess tests require a Python runtime'); + console.log('\nResults: Passed: 0, Failed: 0'); + process.exit(0); + } + let passed = 0; let failed = 0;