← back to AsSeenInMovies
asim smoke +--json flag (monitoring/dashboard output)
ba2ce089113fbd71bf26ec5e11881e452f47bc78 · 2026-05-13 08:38:54 -0700 · SteveStudio2
Files touched
Diff
commit ba2ce089113fbd71bf26ec5e11881e452f47bc78
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 13 08:38:54 2026 -0700
asim smoke +--json flag (monitoring/dashboard output)
---
test/smoke.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/smoke.js b/test/smoke.js
index c17bfd0..b1d5641 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -178,7 +178,13 @@ function check(name, cond, hint = '') {
r = await fetch('/api/zzz-not-a-real');
check('404 api: JSON 404', r.status === 404 && /"error":"not-found"/.test(r.body));
- // Report — pass --quiet to only print failures (useful for CI / cron)
+ // Report — flags:
+ // --quiet : only print failures + tally (CI / cron)
+ // --json : emit a single JSON object (monitoring / dashboards)
+ if (process.argv.includes('--json')) {
+ console.log(JSON.stringify({ base: BASE, pass, fail, total: pass + fail, checks, as_of: new Date().toISOString() }));
+ process.exit(fail === 0 ? 0 : 1);
+ }
const quiet = process.argv.includes('--quiet');
const lines = quiet
? checks.filter(c => !c.ok).map(c => '✗ ' + c.name + (c.hint ? ' (' + c.hint + ')' : ''))
← 7d3963c asim +.deploy.conf — wire into /deploy skill (rsync→Kamatera
·
back to AsSeenInMovies
·
asim smoke --json suppresses header so output is parseable. 1df1a75 →