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:
Wikid82
2025-11-18 15:28:36 -05:00
parent e6f8b15e05
commit be2b99f7e4
6 changed files with 35 additions and 10 deletions

View File

@@ -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,
}
}