mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 19:43:19 +08:00
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
19 lines
738 B
Swift
19 lines
738 B
Swift
import Foundation
|
|
import Testing
|
|
@testable import OpenClaw
|
|
|
|
struct LaunchAgentManagerTests {
|
|
@Test func `launch at login plist does not keep app alive after manual quit`() throws {
|
|
let plist = LaunchAgentManager.plistContents(bundlePath: "/Applications/OpenClaw.app")
|
|
let data = try #require(plist.data(using: .utf8))
|
|
let object = try #require(
|
|
PropertyListSerialization.propertyList(from: data, format: nil) as? [String: Any]
|
|
)
|
|
|
|
#expect(object["RunAtLoad"] as? Bool == true)
|
|
#expect(object["KeepAlive"] == nil)
|
|
|
|
let args = try #require(object["ProgramArguments"] as? [String])
|
|
#expect(args == ["/Applications/OpenClaw.app/Contents/MacOS/OpenClaw"])
|
|
}
|
|
}
|