Add comprehensive tests for agent scaling group update
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Objective
Add comprehensive test coverage for the agent scaling group update functionality, including validation, service layer, and end-to-end flows.
## Test Coverage Scope
### Unit Tests
- Validation logic: prevent update when active kernels exist
- Service layer: update_scaling_group() business logic
- Repository layer: database operations
- Error handling and edge cases
### Integration Tests
- End-to-end GraphQL mutation with active kernels (should fail)
- End-to-end GraphQL mutation without active kernels (should succeed)
- RPC communication with agent
- Transaction rollback scenarios
### Test Scenarios
- Agent with no kernels: update should succeed
- Agent with active kernels: update should fail with clear error message
- Agent with terminated kernels: update should succeed
- Multiple concurrent update attempts
- RPC failure handling
- Database transaction failures
## Dependencies
- Requires BA-3570, BA-3571, and BA-3572 to be completed
## Expected Outcome
All new code paths have appropriate test coverage, ensuring the validation and refactoring work correctly in various scenarios.
JIRA Issue: BA-3573
Contributor guide
Assessment
This issue has not been assessed yet.