test: file upload/download handler test coverage #76

Closed
opened 2026-02-13 19:02:54 +00:00 by forbes · 0 comments
Owner

Ref: docs/ROADMAP.md § Appendix B / 1.4 Unit Test Suite

No tests exist for file handling endpoints. internal/api/file_handlers.go has 7 exported handlers with zero test coverage:

  • HandleUploadFile — multipart upload, checksum verification
  • HandleDownloadFile — download by revision number
  • HandleDownloadLatestFile — latest revision download
  • HandleListItemFiles — list file attachments
  • HandleDeleteItemFile — delete file association
  • HandleSetItemThumbnail — thumbnail upload
  • HandleAssociateItemFile — presigned upload association

Tests should mock MinIO storage and verify checksum validation, error responses for missing files, and correct content-type headers.

**Ref:** `docs/ROADMAP.md` § Appendix B / 1.4 Unit Test Suite No tests exist for file handling endpoints. `internal/api/file_handlers.go` has 7 exported handlers with zero test coverage: - [ ] `HandleUploadFile` — multipart upload, checksum verification - [ ] `HandleDownloadFile` — download by revision number - [ ] `HandleDownloadLatestFile` — latest revision download - [ ] `HandleListItemFiles` — list file attachments - [ ] `HandleDeleteItemFile` — delete file association - [ ] `HandleSetItemThumbnail` — thumbnail upload - [ ] `HandleAssociateItemFile` — presigned upload association Tests should mock MinIO storage and verify checksum validation, error responses for missing files, and correct content-type headers.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/silo#76