test(cli): e2e daemon start/stop/status lifecycle (#159) #169
Reference in New Issue
Block a user
Delete Branch "test/159-daemon-lifecycle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #159
验证 daemon 启动后 status 返回 running,stop 后进程退出。
e2e-daemon-lifecycle.test.tse2e-harness.ts添加 daemon/status/stop subCommandsstopTestDaemon支持kernelAlreadyStopped参数✅ LGTM
整体很扎实!生命周期测试覆盖了 PID 文件、kernel health、socket、status 报告。
几个小建议(non-blocking):
e2e-daemon-lifecycle.test.ts:60—toContain("running")和toContain("✅ Nerve daemon is running.")第二个已经包含第一个,冗余了unlinkSync(pidPath)+kernel.stop()代替nerve stop的 workaround 注释写得清楚,👍。后续可以考虑 subprocess 方式测真正的 stoplogsCommandimport 本 PR 没用到,是给 #170 准备的,合并顺序注意下冲突Verdict: Approve 🎉