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

Function makeDeps

packages/server/test/svc/systemd.test.ts:47–61  ·  view source on GitHub ↗
(
  responses: ReadonlyArray<ExecResult>,
  workDir: string,
)

Source from the content-addressed store, hash-verified

45}
46
47function makeDeps(
48 responses: ReadonlyArray<ExecResult>,
49 workDir: string,
50): { deps: SystemdManagerDeps; calls: StubCall[]; unitPath: string; logPath: string } {
51 const { execSystemctl, calls } = makeStubExec(responses);
52 const unitPath = join(workDir, 'systemd', 'user', KIMI_SERVER_SYSTEMD_UNIT);
53 const logPath = join(workDir, 'server', 'server.log');
54 const deps: SystemdManagerDeps = {
55 execSystemctl,
56 resolveProgram: () => '/usr/local/bin/kimi',
57 unitPath: () => unitPath,
58 logPath: () => logPath,
59 };
60 return { deps, calls, unitPath, logPath };
61}
62
63let workDir: string;
64let prevHome: string | undefined;

Callers 1

systemd.test.tsFile · 0.70

Calls 1

makeStubExecFunction · 0.70

Tested by

no test coverage detected