@@ -694,9 +694,12 @@ describe("launchd install", () => {
|
694 | 694 | |
695 | 695 | await stopLaunchAgent({ env, stdout, disable: true }); |
696 | 696 | |
697 | | -expect(state.launchctlCalls).toContainEqual([ |
698 | | -"disable", |
699 | | -`${typeof process.getuid === "function" ? `gui/${process.getuid()}` : "gui/501"}/ai.openclaw.gateway`, |
| 697 | +const domain = typeof process.getuid === "function" ? `gui/${process.getuid()}` : "gui/501"; |
| 698 | +const serviceId = `${domain}/ai.openclaw.gateway`; |
| 699 | +expect(state.launchctlCalls).toEqual([ |
| 700 | +["disable", serviceId], |
| 701 | +["stop", "ai.openclaw.gateway"], |
| 702 | +["print", serviceId], |
700 | 703 | ]); |
701 | 704 | expect(launchctlCommandNames()).not.toContain("bootout"); |
702 | 705 | expect(output).toContain("Stopped LaunchAgent"); |
@@ -860,8 +863,10 @@ describe("launchd install", () => {
|
860 | 863 | const serviceId = `${domain}/${label}`; |
861 | 864 | expect(result).toEqual({ outcome: "completed" }); |
862 | 865 | expect(cleanStaleGatewayProcessesSync).toHaveBeenCalledWith(18789); |
863 | | -expect(state.launchctlCalls).toContainEqual(["enable", serviceId]); |
864 | | -expect(state.launchctlCalls).toContainEqual(["kickstart", "-k", serviceId]); |
| 866 | +expect(state.launchctlCalls).toEqual([ |
| 867 | +["enable", serviceId], |
| 868 | +["kickstart", "-k", serviceId], |
| 869 | +]); |
865 | 870 | expect(launchctlCommandNames()).not.toContain("bootout"); |
866 | 871 | expect(launchctlCommandNames()).not.toContain("bootstrap"); |
867 | 872 | }); |
|