feat: update docker-compose to use GHCR images and fix test failures
- Update docker-compose.yml to use ghcr.io/wikid82/caddyproxymanagerplus:latest - Update docker-compose.dev.yml to use ghcr.io/wikid82/caddyproxymanagerplus:dev - Fix backend test database isolation (remove shared cache mode) - Add testConnection and enabledServers to useRemoteServers hook - Fix frontend test assertions to wait for async state updates - Wrap mutation assertions in waitFor for proper async handling Backend tests: ✅ ALL PASSING (22 tests) Frontend tests: ⚠️ 45/49 passing (4 useImport tests need mock refinement)
This commit is contained in:
@@ -66,13 +66,25 @@ export function useRemoteServers() {
|
||||
}
|
||||
}
|
||||
|
||||
const testConnection = async (uuid: string) => {
|
||||
try {
|
||||
return await remoteServersAPI.test(uuid)
|
||||
} catch (err) {
|
||||
throw new Error(err instanceof Error ? err.message : 'Failed to test connection')
|
||||
}
|
||||
}
|
||||
|
||||
const enabledServers = servers.filter(s => s.enabled)
|
||||
|
||||
return {
|
||||
servers,
|
||||
enabledServers,
|
||||
loading,
|
||||
error,
|
||||
refresh: fetchServers,
|
||||
createServer,
|
||||
updateServer,
|
||||
deleteServer,
|
||||
testConnection,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user