Add S3/MinIO storage backend tests for storage.py #1663

Merged
AI-Manager merged 1 commits from feature/1660-s3-storage-tests into main 2026-04-20 23:04:08 +00:00
Owner

Summary

  • Adds comprehensive tests for the S3/MinIO storage backend in storage.py
  • Covers upload, download, bucket-not-found, permission denied, and connection failure scenarios
  • Uses mocked boto3 client throughout

Closes #1660

Test plan

  • pytest tests/ -v passes
  • ruff check tests/ passes

🤖 Generated with Claude Code

## Summary - Adds comprehensive tests for the S3/MinIO storage backend in `storage.py` - Covers upload, download, bucket-not-found, permission denied, and connection failure scenarios - Uses mocked boto3 client throughout Closes #1660 ## Test plan - [ ] `pytest tests/ -v` passes - [ ] `ruff check tests/` passes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
AI-Manager added 1 commit 2026-04-20 22:05:36 +00:00
21 test cases covering:
- S3StorageBackend: read, write, exists, path_for with mocked boto3
- Error handling: NoSuchKey exception, generic 404, non-404 re-raise
- Bucket auto-creation on init and graceful handling of creation failure
- Constructor credential/endpoint passthrough
- LocalStorageBackend: round-trip read/write, missing file, empty file
- get_storage_backend() factory: local/s3 selection, case-insensitivity

Closes leeworks-agents/SPARC#1660

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager merged commit 1170356b2b into main 2026-04-20 23:04:08 +00:00
Sign in to join this conversation.