Skip to content

test: add unit tests for minio infra and upload_requests service - #72

Merged
ademboukabes merged 1 commit into
developfrom
feat/upload-requests-minio-tests
Aug 3, 2026
Merged

test: add unit tests for minio infra and upload_requests service#72
ademboukabes merged 1 commit into
developfrom
feat/upload-requests-minio-tests

Conversation

@ademboukabes

Copy link
Copy Markdown
Collaborator

Description

This PR introduces comprehensive unit tests for two critical backend components (Phases 3 and 4 of our testing roadmap).

Key Additions:

1. MinIO Infrastructure (app/infra/minio.py)

  • Added mock tests for all bucket operations (put, get, delete, copy).
  • Covered S3Error exception handling.
  • Implemented file extension validation tests for image buckets.

2. Upload Requests Service (app/service/upload_requests.py)

  • Thoroughly mocked all external dependencies (GoogleDriveClient, NatsClient, StagedUploadStorageService) and DB queriers.
  • Tested single photo uploads, folder batch processing, and approval workflows.
  • Validated rollback mechanisms and SQL integrity error handling (Conflict scenarios).

Verification:

  • Full CI test suite has been executed locally.
  • All tests (184/184) passed successfully.
  • Linter (ruff) rules respected.

@ademboukabes
ademboukabes merged commit 3f65137 into develop Aug 3, 2026
2 checks passed
@ademboukabes
ademboukabes deleted the feat/upload-requests-minio-tests branch August 3, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant