mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 09:04:27 +00:00
Fix health service tests
This commit is contained in:
@@ -12,12 +12,14 @@ import { AuthProvider } from '@/contexts/AuthContext'
|
||||
vi.mock('@/lib/api', () => ({
|
||||
instancesApi: {
|
||||
list: vi.fn(),
|
||||
get: vi.fn(),
|
||||
create: vi.fn(),
|
||||
update: vi.fn(),
|
||||
start: vi.fn(),
|
||||
stop: vi.fn(),
|
||||
restart: vi.fn(),
|
||||
delete: vi.fn(),
|
||||
getHealth: vi.fn(),
|
||||
},
|
||||
serverApi: {
|
||||
getHelp: vi.fn(),
|
||||
@@ -30,9 +32,21 @@ vi.mock('@/lib/api', () => ({
|
||||
vi.mock('@/lib/healthService', () => ({
|
||||
healthService: {
|
||||
subscribe: vi.fn(() => () => {}),
|
||||
checkHealth: vi.fn(),
|
||||
refreshHealth: vi.fn(() => Promise.resolve()),
|
||||
checkHealthAfterOperation: vi.fn(),
|
||||
performHealthCheck: vi.fn(() => Promise.resolve({
|
||||
state: 'ready',
|
||||
instanceStatus: 'running',
|
||||
lastChecked: new Date(),
|
||||
source: 'http'
|
||||
})),
|
||||
},
|
||||
checkHealth: vi.fn(),
|
||||
checkHealth: vi.fn(() => Promise.resolve({
|
||||
state: 'ready',
|
||||
instanceStatus: 'running',
|
||||
lastChecked: new Date(),
|
||||
source: 'http'
|
||||
})),
|
||||
}))
|
||||
|
||||
function renderApp() {
|
||||
|
||||
Reference in New Issue
Block a user