From 6355bae1f90fd037f513c0ac1bd5500eac79ee23 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Thu, 19 Feb 2026 01:14:06 -0500 Subject: [PATCH] test: make boot-md startup integration workspace assertion cross-platform --- .../boot-md/handler.gateway-startup.integration.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hooks/bundled/boot-md/handler.gateway-startup.integration.test.ts b/src/hooks/bundled/boot-md/handler.gateway-startup.integration.test.ts index cfbc0bb420b..0bd0f264a64 100644 --- a/src/hooks/bundled/boot-md/handler.gateway-startup.integration.test.ts +++ b/src/hooks/bundled/boot-md/handler.gateway-startup.integration.test.ts @@ -1,4 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { resolveAgentWorkspaceDir } from "../../../agents/agent-scope.js"; import type { CliDeps } from "../../../cli/deps.js"; import type { OpenClawConfig } from "../../../config/config.js"; @@ -43,14 +44,17 @@ describe("boot-md startup hook integration", () => { const event = createInternalHookEvent("gateway", "startup", "gateway:startup", { cfg, deps }); await triggerInternalHook(event); + const mainWorkspaceDir = resolveAgentWorkspaceDir(cfg, "main"); + const opsWorkspaceDir = resolveAgentWorkspaceDir(cfg, "ops"); + expect(runBootOnce).toHaveBeenCalledTimes(2); expect(runBootOnce).toHaveBeenNthCalledWith( 1, - expect.objectContaining({ cfg, deps, workspaceDir: "/ws/main", agentId: "main" }), + expect.objectContaining({ cfg, deps, workspaceDir: mainWorkspaceDir, agentId: "main" }), ); expect(runBootOnce).toHaveBeenNthCalledWith( 2, - expect.objectContaining({ cfg, deps, workspaceDir: "/ws/ops", agentId: "ops" }), + expect.objectContaining({ cfg, deps, workspaceDir: opsWorkspaceDir, agentId: "ops" }), ); }); });