diff --git a/app/game-api/src/config.ts b/app/game-api/src/config.ts index 27e6bf01..7e9c92be 100644 --- a/app/game-api/src/config.ts +++ b/app/game-api/src/config.ts @@ -28,7 +28,7 @@ export const resolveGameApiConfigFromEnv = (env: NodeJS.ProcessEnv = process.env return { host: env.GAME_API_HOST ?? '0.0.0.0', port: parseNumberWithFallback(env.GAME_API_PORT, 14000, 'GAME_API_PORT'), - trpcPath: env.TRPC_PATH ?? '/trpc', + trpcPath: env.GAME_TRPC_PATH ?? env.TRPC_PATH ?? '/trpc', eventsPath: env.GAME_API_EVENTS_PATH ?? '/events', profile, scenario, diff --git a/app/gateway-api/src/config.ts b/app/gateway-api/src/config.ts index 0a329493..6a927ed3 100644 --- a/app/gateway-api/src/config.ts +++ b/app/gateway-api/src/config.ts @@ -61,7 +61,7 @@ export const resolveGatewayApiConfigFromEnv = (env: NodeJS.ProcessEnv = process. return { host: env.GATEWAY_API_HOST ?? '0.0.0.0', port: parseNumberWithFallback(env.GATEWAY_API_PORT, 13000, 'GATEWAY_API_PORT'), - trpcPath: env.TRPC_PATH ?? '/trpc', + trpcPath: env.GATEWAY_TRPC_PATH ?? env.TRPC_PATH ?? '/trpc', dbSchema: resolveSchemaName(env.GATEWAY_DB_SCHEMA), redisKeyPrefix, flushChannel: `${redisKeyPrefix}:flush`, diff --git a/docs/e2e-orchestrator-tests.md b/docs/e2e-orchestrator-tests.md index 3147820a..4b4ab236 100644 --- a/docs/e2e-orchestrator-tests.md +++ b/docs/e2e-orchestrator-tests.md @@ -46,6 +46,9 @@ Minimum environment variables for the test: - `GATEWAY_REDIS_PREFIX` (optional but recommended to isolate keys) - `GATEWAY_WORKSPACE_ROOT` (workspace root with built `dist/`) - `GATEWAY_WORKTREE_ROOT` (worktree root for builds; can be temp) +- `GATEWAY_TRPC_PATH` (e.g. `/gateway/api/trpc`) +- `GAME_TRPC_PATH` (e.g. `/che/api/trpc`) +- `GAME_API_EVENTS_PATH` (e.g. `/che/api/events`) For profile alignment: diff --git a/docs/integration-tests.md b/docs/integration-tests.md index 0269bfad..2d58d19c 100644 --- a/docs/integration-tests.md +++ b/docs/integration-tests.md @@ -32,6 +32,7 @@ The test runs real Postgres and Redis, and talks to the API servers via tRPC. - `GAME_TOKEN_SECRET`, `KAKAO_REST_KEY`, `KAKAO_REDIRECT_URI` - `GATEWAY_BOOTSTRAP_TOKEN` - `GATEWAY_API_HOST`, `GATEWAY_API_PORT`, `GAME_API_HOST`, `GAME_API_PORT` + - `GATEWAY_TRPC_PATH`, `GAME_TRPC_PATH`, `GAME_API_EVENTS_PATH` - `PROFILE=che`, `SCENARIO=2` - `pnpm install` and `pnpm build` have already completed. diff --git a/tools/integration-tests/test/orchestrator.e2e.test.ts b/tools/integration-tests/test/orchestrator.e2e.test.ts index b3cd4dd3..ff9aaee6 100644 --- a/tools/integration-tests/test/orchestrator.e2e.test.ts +++ b/tools/integration-tests/test/orchestrator.e2e.test.ts @@ -418,8 +418,9 @@ describe('pm2 orchestrator e2e', () => { const adminSessionRef: { value?: string } = {}; const accessTokenRef: { value?: string } = {}; const gatewayClient = createGatewayClient(gatewayUrl, gatewayServer.config.trpcPath, adminSessionRef); - const gameClientPublic = createGameClient(gameUrl, process.env.TRPC_PATH ?? '/trpc', { value: undefined }); - const gameClientAuthed = createGameClient(gameUrl, process.env.TRPC_PATH ?? '/trpc', accessTokenRef); + const gameTrpcPath = process.env.GAME_TRPC_PATH ?? process.env.TRPC_PATH ?? '/trpc'; + const gameClientPublic = createGameClient(gameUrl, gameTrpcPath, { value: undefined }); + const gameClientAuthed = createGameClient(gameUrl, gameTrpcPath, accessTokenRef); const bootstrap = await gatewayClient.auth.bootstrapLocal.mutate({ token: bootstrapToken,