( responses: ReadonlyArray<ExecResult>, workDir: string, )
| 45 | } |
| 46 | |
| 47 | function 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 | |
| 63 | let workDir: string; |
| 64 | let prevHome: string | undefined; |
no test coverage detected