From e1f21d3209dd3b235da86dd470c636783f4363f5 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sun, 18 Jan 2026 12:44:22 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=99=98=EA=B2=BD=20=EB=B3=80=EC=88=98?= =?UTF-8?q?=EC=97=90=20GAME=5FTRPC=5FPATH=20=EB=B0=8F=20GATEWAY=5FTRPC=5FP?= =?UTF-8?q?ATH=20=EC=B6=94=EA=B0=80,=20=EA=B4=80=EB=A0=A8=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/game-api/src/config.ts | 2 +- app/gateway-api/src/config.ts | 2 +- docs/e2e-orchestrator-tests.md | 3 +++ docs/integration-tests.md | 1 + tools/integration-tests/test/orchestrator.e2e.test.ts | 5 +++-- 5 files changed, 9 insertions(+), 4 deletions(-) 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,