-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestpriority-highHigh priorityHigh prioritytestingTesting infrastructure and test coverageTesting infrastructure and test coverage
Description
Description
The recent Kestra integration (PR #37) has zero test coverage. Critical functionality is untested.
Untested Components
-
Kestra Client (
kestra_client.py)- Flow triggering
- Status checking
- Error handling
-
Webhook Endpoints (
webhooks.py)- Task update handling
- Execution update handling
- WebSocket broadcasting
-
WebSocket Manager (
websocket_manager.py)- Connection management
- Broadcast functionality
- State tracking
Required Tests
Unit Tests
# backend/tests/test_kestra_client.py
async def test_trigger_flow_success()
async def test_trigger_flow_offline()
async def test_get_execution_status()
# backend/tests/test_webhooks.py
async def test_task_update_webhook()
async def test_execution_update_webhook()
async def test_webhook_broadcasts_to_websocket()
# backend/tests/test_websocket_manager.py
async def test_connection_lifecycle()
async def test_broadcast_to_multiple_clients()
async def test_execution_status_tracking()Integration Tests
- Test full flow: trigger → webhook → WebSocket broadcast
- Test Kestra offline scenario
- Test concurrent WebSocket connections
- Test webhook signature verification (after Issue SEVERE: Debug Code and Sensitive Data Logging in Production #32)
Acceptance Criteria
- Unit tests for
KestraClient(>80% coverage) - Unit tests for webhook endpoints
- Unit tests for
ConnectionManager - Integration test for end-to-end flow
- Mock Kestra API responses
- Test error scenarios (timeouts, invalid data)
Location
- Create:
backend/tests/test_kestra_client.py - Create:
backend/tests/test_webhooks.py - Create:
backend/tests/test_websocket_manager.py - Related Code: PR Kestra end to end integration with the frontend and backend #37
Related Issues
- Issue Implement comprehensive testing infrastructure #20 (Testing Infrastructure)
- Issue Install and configure Cline #4 (Cline configuration testing)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpriority-highHigh priorityHigh prioritytestingTesting infrastructure and test coverageTesting infrastructure and test coverage