MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / bootPublicFixed

Function bootPublicFixed

packages/server/test/host-exposure.e2e.test.ts:280–294  ·  view source on GitHub ↗

Boot a 0.0.0.0 server with a deterministic fixed token.

(token = 'real-token')

Source from the content-addressed store, hash-verified

278
279 /** Boot a 0.0.0.0 server with a deterministic fixed token. */
280 async function bootPublicFixed(token = 'real-token'): Promise<RunningServer> {
281 process.env['KIMI_CODE_PASSWORD'] = 'test-pw';
282 const { lockPath, homeDir } = tmpPaths();
283 const server = await startServer({
284 serviceOverrides: [fixedTokenAuth(token)],
285 host: '0.0.0.0',
286 port: 0,
287 lockPath,
288 insecureNoTls: true,
289 logger: pino({ level: 'silent' }),
290 coreProcessOptions: { homeDir },
291 });
292 running.push(server);
293 return server;
294 }
295
296 it('accepts the user password as a bearer token (verifyPassword path)', async () => {
297 const server = await bootPublicReal();

Callers 1

Calls 4

startServerFunction · 0.90
fixedTokenAuthFunction · 0.90
tmpPathsFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected