choredocker): enhance local Docker socket access and error handling
- Added guidance for Docker socket group access in docker-compose files. - Introduced docker-compose.override.example.yml for supplemental group configuration. - Improved entrypoint diagnostics to include socket GID and group guidance. - Updated README with instructions for setting up Docker socket access. - Enhanced backend error handling to provide actionable messages for permission issues. - Updated frontend components to display troubleshooting information regarding Docker socket access. - Added tests to ensure proper error messages and guidance are rendered in UI. - Revised code coverage settings to include Docker service files for better regression tracking.
This commit is contained in:
@@ -1343,4 +1343,32 @@ describe('ProxyHostForm', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('Docker Connection Failed troubleshooting', () => {
|
||||
it('renders supplemental group guidance when docker error is present', async () => {
|
||||
const { useDocker } = await import('../../hooks/useDocker')
|
||||
vi.mocked(useDocker).mockReturnValue({
|
||||
containers: [],
|
||||
isLoading: false,
|
||||
error: new Error('Docker socket permission denied'),
|
||||
refetch: vi.fn(),
|
||||
})
|
||||
|
||||
await renderWithClientAct(
|
||||
<ProxyHostForm onSubmit={mockOnSubmit} onCancel={mockOnCancel} />
|
||||
)
|
||||
|
||||
// Select Local Docker Socket source to trigger error panel
|
||||
await selectComboboxOption('Source', 'Local (Docker Socket)')
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Docker Connection Failed')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
expect(screen.getByText(/Troubleshooting:/)).toBeInTheDocument()
|
||||
expect(screen.getByText(/Docker socket group/)).toBeInTheDocument()
|
||||
expect(screen.getByText('group_add')).toBeInTheDocument()
|
||||
expect(screen.getByText('--group-add')).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user