Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.13 KB

File metadata and controls

41 lines (30 loc) · 1.13 KB

Testing

Current test scope

The unit test suite currently covers:

  • provider routing and fallback
  • playbook matching and rendering
  • profile storage and validation behavior
  • security policy classification
  • plan review aggregation
  • execution dry-run and failure handling
  • repair plan preparation
  • history persistence
  • explainability output
  • task-flow safety around blocked repair plans

Run tests

python -m compileall src
python -m unittest discover -s tests -p "test_*.py"

Testability design choices

The codebase is structured for local fakes and pure-service tests:

  • SSH execution is abstracted behind SSHService and SSHSessionProtocol
  • provider behavior can be replaced with fake adapters
  • storage uses JSON stores that can point at temporary directories
  • planning, security, explainability, and history are all testable without Rich or Typer

Recommended additions

Useful next test areas:

  • high-risk typed approval prompts
  • extension loading from custom playbook and policy directories
  • richer rollback guidance coverage
  • config validation and provider credential checks when live adapters are added