mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-23 19:08:22 -06:00
test(gateway): model ops as configured in voice-wake agent fixture
This commit is contained in:
@@ -5316,6 +5316,8 @@ describe("gateway agent handler", () => {
|
||||
});
|
||||
|
||||
it("does not auto-route voice wake requests with another agent's explicit main session", async () => {
|
||||
const opsAgentCfg = { agents: { list: [{ id: "main" }, { id: "ops" }] } };
|
||||
mocks.listAgentIds.mockReturnValue(["main", "ops"]);
|
||||
mocks.loadVoiceWakeRoutingConfig.mockResolvedValue({
|
||||
version: 1,
|
||||
defaultTarget: { sessionKey: "agent:main:voice" },
|
||||
@@ -5325,7 +5327,7 @@ describe("gateway agent handler", () => {
|
||||
mocks.resolveVoiceWakeRouteByTrigger.mockReturnValue({ sessionKey: "agent:main:voice" });
|
||||
|
||||
mocks.loadSessionEntry.mockImplementation((sessionKey: string) => ({
|
||||
cfg: {},
|
||||
cfg: opsAgentCfg,
|
||||
storePath: "/tmp/sessions.json",
|
||||
entry: {
|
||||
sessionId: "voice-session-id",
|
||||
@@ -5340,6 +5342,7 @@ describe("gateway agent handler", () => {
|
||||
});
|
||||
mocks.loadVoiceWakeRoutingConfig.mockClear();
|
||||
mocks.resolveVoiceWakeRouteByTrigger.mockClear();
|
||||
mocks.agentCommand.mockClear();
|
||||
|
||||
const respond = vi.fn();
|
||||
await invokeAgent(
|
||||
|
||||
Reference in New Issue
Block a user