mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +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
@@ -1,6 +1,4 @@
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
|
||||
|
||||
const mockExecuteCommand = vi.fn()
|
||||
import { describe, it, expect, vi, beforeEach, afterEach, beforeAll, afterAll } from 'vitest'
|
||||
|
||||
vi.mock('@opencode-manager/shared/config/env', () => ({
|
||||
ENV: {
|
||||
@@ -18,8 +16,10 @@ vi.mock('@opencode-manager/shared/config/env', () => ({
|
||||
getWorkspacePath: vi.fn(() => '/tmp/test-workspace')
|
||||
}))
|
||||
|
||||
let mockExecuteCommand: any
|
||||
|
||||
vi.mock('../../src/utils/process', () => ({
|
||||
executeCommand: mockExecuteCommand
|
||||
executeCommand: vi.fn()
|
||||
}))
|
||||
|
||||
vi.mock('fs', () => ({
|
||||
@@ -30,6 +30,11 @@ vi.mock('fs', () => ({
|
||||
}))
|
||||
|
||||
import { validateSSHPrivateKey } from '../../src/utils/ssh-validation'
|
||||
import { executeCommand } from '../../src/utils/process'
|
||||
|
||||
beforeAll(() => {
|
||||
mockExecuteCommand = executeCommand
|
||||
})
|
||||
|
||||
describe('validateSSHPrivateKey', () => {
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in new issue
Block a user