mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 21:04:23 +01:00
Add skip SSH host key verification and fix self-hosted server support (#121)
* Add SSH host key verification with automatic trust and SCP-style URL support * Fix TypeScript errors for SSH host key schema and test mocks
This commit is contained in:
1 parent
677ce748cd
commit
7341dce1ef
25 files changed
+203
-123
No files matched your search
@@ -148,22 +148,19 @@ describe('SSH Key Cleanup', () => {
|
||||
await writeTemporarySSHKey(key2, 'test-cleanup-2')
|
||||
|
||||
await cleanupAllSSHKeys()
|
||||
|
||||
const keysDir = join(getWorkspacePath(), '.ssh-keys')
|
||||
await expect(fs.access(keysDir)).rejects.toThrow()
|
||||
})
|
||||
|
||||
it('should handle cleanup of non-existent file gracefully', async () => {
|
||||
const nonExistentPath = '/tmp/non-existent-ssh-key-12345'
|
||||
|
||||
await expect(cleanupSSHKey(nonExistentPath)).resolves.not.toThrow()
|
||||
})
|
||||
it('should handle cleanup of non-existent file gracefully', async () => {
|
||||
const nonExistentPath = '/tmp/non-existent-ssh-key-12345'
|
||||
|
||||
await cleanupSSHKey(nonExistentPath)
|
||||
})
|
||||
|
||||
it('should handle cleanup of already cleaned up file gracefully', async () => {
|
||||
const key = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRHw== test@host'
|
||||
const keyPath = await writeTemporarySSHKey(key, 'test-double-cleanup')
|
||||
|
||||
await cleanupSSHKey(keyPath)
|
||||
await expect(cleanupSSHKey(keyPath)).resolves.not.toThrow()
|
||||
})
|
||||
})
|
||||
it('should handle cleanup of already cleaned up file gracefully', async () => {
|
||||
const key = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRHw== test@host'
|
||||
const keyPath = await writeTemporarySSHKey(key, 'test-double-cleanup')
|
||||
|
||||
await cleanupSSHKey(keyPath)
|
||||
await cleanupSSHKey(keyPath)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user