mirror of
https://github.com/stablyai/orca.git
synced 2026-10-28 08:02:54 +00:00
fix(ssh): harden relay repair cancellation and locking
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -507,6 +507,15 @@ describe('spawnSystemSsh', () => {
|
||||
expect(mockProc.stdin.end).toHaveBeenCalledWith('contents')
|
||||
})
|
||||
|
||||
it('marks a system command channel when local teardown is requested', () => {
|
||||
const channel = spawnSystemSshCommand(createTarget(), 'npm install')
|
||||
|
||||
channel.close()
|
||||
|
||||
expect(channel._closeRequested).toBe(true)
|
||||
expect(mockProc.kill).toHaveBeenCalledWith('SIGTERM')
|
||||
})
|
||||
|
||||
it('removes wrapped process listeners after command close', () => {
|
||||
const proc = createEventedProcess()
|
||||
spawnMock.mockReturnValue(proc)
|
||||
|
||||
Reference in New Issue
Block a user