test: CSV and ODS import/export handler test coverage #77

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

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

No handler-level tests for CSV or ODS endpoints. The ODS package has unit tests (internal/ods/ods_test.go, 10 tests) but the API handlers that use it are untested.

CSV handlers (internal/api/csv.go, ~593 lines):

  • HandleExportCSV — column selection, filtering, output format
  • HandleImportCSV — dry-run validation, upsert, error reporting
  • HandleCSVTemplate — template generation per schema

ODS handlers (internal/api/ods.go, ~1061 lines):

  • HandleExportODS — item export with properties
  • HandleImportODS — item import with validation
  • HandleODSTemplate — template generation
  • HandleExportBOMODS — BOM export to ODS
  • HandleProjectSheetODS — project sheet export

Focus on round-trip correctness: export then re-import should produce equivalent data.

**Ref:** `docs/ROADMAP.md` § Appendix B / 1.4 Unit Test Suite No handler-level tests for CSV or ODS endpoints. The ODS package has unit tests (`internal/ods/ods_test.go`, 10 tests) but the API handlers that use it are untested. **CSV handlers** (`internal/api/csv.go`, ~593 lines): - [ ] `HandleExportCSV` — column selection, filtering, output format - [ ] `HandleImportCSV` — dry-run validation, upsert, error reporting - [ ] `HandleCSVTemplate` — template generation per schema **ODS handlers** (`internal/api/ods.go`, ~1061 lines): - [ ] `HandleExportODS` — item export with properties - [ ] `HandleImportODS` — item import with validation - [ ] `HandleODSTemplate` — template generation - [ ] `HandleExportBOMODS` — BOM export to ODS - [ ] `HandleProjectSheetODS` — project sheet export Focus on round-trip correctness: export then re-import should produce equivalent data.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/silo#77