test: file upload/download handler test coverage #76
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ref:
docs/ROADMAP.md§ Appendix B / 1.4 Unit Test SuiteNo tests exist for file handling endpoints.
internal/api/file_handlers.gohas 7 exported handlers with zero test coverage:HandleUploadFile— multipart upload, checksum verificationHandleDownloadFile— download by revision numberHandleDownloadLatestFile— latest revision downloadHandleListItemFiles— list file attachmentsHandleDeleteItemFile— delete file associationHandleSetItemThumbnail— thumbnail uploadHandleAssociateItemFile— presigned upload associationTests should mock MinIO storage and verify checksum validation, error responses for missing files, and correct content-type headers.