diff --git a/src/main/runtime/runtime-rpc-websocket-long-poll-caps.test.ts b/src/main/runtime/runtime-rpc-websocket-long-poll-caps.test.ts index 2054fa23de8..bcf734a06d7 100644 --- a/src/main/runtime/runtime-rpc-websocket-long-poll-caps.test.ts +++ b/src/main/runtime/runtime-rpc-websocket-long-poll-caps.test.ts @@ -1,3 +1,4 @@ +import './rpc/unused-default-rpc-methods.test-fixture' import { mkdtempSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' @@ -8,6 +9,8 @@ import { OrcaRuntimeService } from './orca-runtime' import { OrchestrationDb } from './orchestration/db' import { OrcaRuntimeRpcServer } from './runtime-rpc' import { DeviceRegistry } from './device-registry' +import { ORCHESTRATION_CHECK_METHODS } from './rpc/methods/orchestration/messaging/check-methods' +import { ORCHESTRATION_ASK_METHODS } from './rpc/methods/orchestration/messaging/ask-methods' import { withCurrentOrchestrationContract, waitFor, @@ -45,6 +48,7 @@ describe('OrcaRuntimeRpcServer', () => { vi.spyOn(runtime, 'getTerminalPaneKey').mockImplementation((handle) => `tab_${handle}:leaf`) const server = new OrcaRuntimeRpcServer({ runtime, + methods: [...ORCHESTRATION_CHECK_METHODS, ...ORCHESTRATION_ASK_METHODS], userDataPath, enableWebSocket: false, longPollCap: 1 @@ -126,6 +130,7 @@ describe('OrcaRuntimeRpcServer', () => { // Why: cap 4 → ask sub-cap 2, so the third ask must be shed while waits keep the other half. const server = new OrcaRuntimeRpcServer({ runtime, + methods: [...ORCHESTRATION_CHECK_METHODS, ...ORCHESTRATION_ASK_METHODS], userDataPath, enableWebSocket: false, longPollCap: 4 @@ -214,7 +219,12 @@ describe('OrcaRuntimeRpcServer', () => { configureNotificationDismissalStore: () => {}, getRuntimeId: () => 'test-runtime' } as unknown as OrcaRuntimeService - const server = new OrcaRuntimeRpcServer({ runtime, userDataPath, enableWebSocket: false }) + const server = new OrcaRuntimeRpcServer({ + runtime, + methods: [], + userDataPath, + enableWebSocket: false + }) server['deviceRegistry'] = new DeviceRegistry(userDataPath) const entry = server['deviceRegistry']!.addDevice('runtime-test', 'runtime') const ws = new FakeWebSocket() diff --git a/src/main/runtime/runtime-rpc-websocket-reply-size-limit.test.ts b/src/main/runtime/runtime-rpc-websocket-reply-size-limit.test.ts index e1b71ef9ff3..dac8287d354 100644 --- a/src/main/runtime/runtime-rpc-websocket-reply-size-limit.test.ts +++ b/src/main/runtime/runtime-rpc-websocket-reply-size-limit.test.ts @@ -1,3 +1,4 @@ +import './rpc/unused-default-rpc-methods.test-fixture' import { mkdtempSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' @@ -6,6 +7,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { OrcaRuntimeService } from './orca-runtime' import { OrcaRuntimeRpcServer } from './runtime-rpc' import { DeviceRegistry } from './device-registry' +import { FILE_METHODS } from './rpc/methods/files' import { E2EEChannel } from './rpc/e2ee-channel' import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from './rpc/e2ee-crypto' import { REMOTE_RUNTIME_MAX_OUTBOUND_JSON_BYTES } from '../../shared/remote-runtime-memory-limits' @@ -24,7 +26,12 @@ function hugeListing(): DirEntry[] { function createServer() { const userDataPath = mkdtempSync(join(tmpdir(), 'orca-runtime-rpc-reply-size-')) const runtime = new OrcaRuntimeService() - const server = new OrcaRuntimeRpcServer({ runtime, userDataPath, enableWebSocket: false }) + const server = new OrcaRuntimeRpcServer({ + runtime, + methods: FILE_METHODS, + userDataPath, + enableWebSocket: false + }) server['deviceRegistry'] = new DeviceRegistry(userDataPath) const device = server['deviceRegistry'].addDevice('paired-desktop', 'runtime') return { runtime, server, device }