惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
Jina AI
Jina AI
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
MyScale Blog
MyScale Blog
I
InfoQ
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
T
Tailwind CSS Blog
D
DataBreaches.Net
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Blog of Author Tim Ferriss
B
Blog
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
雷峰网
雷峰网
Recent Announcements
Recent Announcements
量子位
B
Blog RSS Feed

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: tighten daemon status assertions · openclaw/opencla...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -73,6 +73,10 @@ vi.mock("./status.gather.js", () => ({

7373

}));

74747575

describe("printDaemonStatus", () => {

76+

function expectMockLineContains(mock: typeof runtime.log, expected: string) {

77+

expect(mock.mock.calls.some(([line]) => line.includes(expected))).toBe(true);

78+

}

79+7680

beforeEach(() => {

7781

runtime.log.mockReset();

7882

runtime.error.mockReset();

@@ -117,12 +121,8 @@ describe("printDaemonStatus", () => {

117121

{ json: false },

118122

);

119123120-

expect(runtime.error).toHaveBeenCalledWith(

121-

expect.stringContaining("Gateway runtime PID does not own the listening port"),

122-

);

123-

expect(runtime.error).toHaveBeenCalledWith(

124-

expect.stringContaining(formatCliCommand("openclaw gateway restart")),

125-

);

124+

expectMockLineContains(runtime.error, "Gateway runtime PID does not own the listening port");

125+

expectMockLineContains(runtime.error, formatCliCommand("openclaw gateway restart"));

126126

});

127127128128

it("prints probe kind and capability separately", () => {

@@ -153,8 +153,8 @@ describe("printDaemonStatus", () => {

153153

{ json: false },

154154

);

155155156-

expect(runtime.log).toHaveBeenCalledWith(expect.stringContaining("Connectivity probe: ok"));

157-

expect(runtime.log).toHaveBeenCalledWith(expect.stringContaining("Capability: write-capable"));

156+

expectMockLineContains(runtime.log, "Connectivity probe: ok");

157+

expectMockLineContains(runtime.log, "Capability: write-capable");

158158

});

159159160160

it("prints CLI and gateway versions with readable guidance when they differ", () => {

@@ -190,17 +190,12 @@ describe("printDaemonStatus", () => {

190190

{ json: false },

191191

);

192192193-

expect(runtime.log).toHaveBeenCalledWith(

194-

expect.stringContaining("CLI version: 2026.4.23 (/usr/local/bin/openclaw)"),

195-

);

196-

expect(runtime.log).toHaveBeenCalledWith(expect.stringContaining("Gateway version: 2026.5.6"));

197-

expect(runtime.error).toHaveBeenCalledWith(

198-

expect.stringContaining("this OpenClaw command is version 2026.4.23"),

199-

);

200-

expect(runtime.error).toHaveBeenCalledWith(

201-

expect.stringContaining(

202-

"if this mismatch is unexpected, update PATH so `openclaw` points to the version you want",

203-

),

193+

expectMockLineContains(runtime.log, "CLI version: 2026.4.23 (/usr/local/bin/openclaw)");

194+

expectMockLineContains(runtime.log, "Gateway version: 2026.5.6");

195+

expectMockLineContains(runtime.error, "this OpenClaw command is version 2026.4.23");

196+

expectMockLineContains(

197+

runtime.error,

198+

"if this mismatch is unexpected, update PATH so `openclaw` points to the version you want",

204199

);

205200

});

206201

@@ -231,12 +226,8 @@ describe("printDaemonStatus", () => {

231226

{ json: false },

232227

);

233228234-

expect(runtime.log).toHaveBeenCalledWith(

235-

expect.stringContaining("Recent restart handoff: full-process via launchd"),

236-

);

237-

expect(runtime.log).toHaveBeenCalledWith(

238-

expect.stringContaining("reason=plugin source changed"),

239-

);

229+

expectMockLineContains(runtime.log, "Recent restart handoff: full-process via launchd");

230+

expectMockLineContains(runtime.log, "reason=plugin source changed");

240231

});

241232242233

it("passes daemon TLS state to dashboard link rendering", () => {

@@ -321,9 +312,7 @@ describe("printDaemonStatus", () => {

321312

{ json: false },

322313

);

323314324-

expect(runtime.error).toHaveBeenCalledWith(expect.stringContaining("Config warnings:"));

325-

expect(runtime.error).toHaveBeenCalledWith(

326-

expect.stringContaining("without channelConfigs metadata"),

327-

);

315+

expectMockLineContains(runtime.error, "Config warnings:");

316+

expectMockLineContains(runtime.error, "without channelConfigs metadata");

328317

});

329318

});