Fault injector boilerplate by kiryazovi-redis · Pull Request #3749 · redis/redis-py (original) (raw)
This commit introduces a comprehensive fault injector client that provides a Python interface for interacting with Redis Enterprise fault injection services. The client supports:
- Multiple action types (DMC restart, failover, reshard, network failure)
- Direct rladmin command execution
- Sequence of actions for complex testing scenarios
- Full HTTP API integration with proper error handling
- Debug output for troubleshooting test scenarios
The fault injector client enables automated testing of Redis Enterprise cluster resilience and failover scenarios, supporting the CAE client testing framework approach for real enterprise server integration.
- Fixed whitespace in blank lines (W293)
- Added trailing newline at end of file (W292)
- Applied ruff formatting for consistent code style:
- Improved line breaks for long function signatures
- Consistent quote style (single to double quotes)
- Proper parameter alignment and indentation
All linting checks now pass:
- ruff check: ✅ All checks passed
- ruff format: ✅ Code properly formatted
- vulture: ✅ No dead code detected