mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
Refactor health checks to use OpenCode liveness endpoint
This commit is contained in:
1 parent
5c381ddf6c
commit
adc1290836
12 files changed
+62
-18
No files matched your search
@@ -132,7 +132,7 @@ describe('OpenCodeSupervisor', () => {
|
||||
|
||||
manager.checkHealth.mockResolvedValueOnce(false)
|
||||
|
||||
const status = await supervisor.checkNow('api_probe')
|
||||
const status = await supervisor.checkNow('manual')
|
||||
|
||||
expect(status.state).toBe('unhealthy')
|
||||
expect(status.failureCount).toBe(1)
|
||||
@@ -152,7 +152,7 @@ describe('OpenCodeSupervisor', () => {
|
||||
.mockResolvedValueOnce(false)
|
||||
.mockResolvedValueOnce(true)
|
||||
|
||||
const status = await supervisor.checkNow('api_probe')
|
||||
const status = await supervisor.checkNow('manual')
|
||||
|
||||
expect(status.healthy).toBe(true)
|
||||
expect(ensureDirectoryExists).toHaveBeenCalled()
|
||||
@@ -167,7 +167,7 @@ describe('OpenCodeSupervisor', () => {
|
||||
|
||||
manager.isOperationInProgress.mockReturnValue(true)
|
||||
|
||||
await supervisor.checkNow('api_probe')
|
||||
await supervisor.checkNow('manual')
|
||||
|
||||
expect(manager.checkHealth).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user