T5.3: Fill test gaps — cleanup, folder filtering, migration, concurrent RunDue
- src/runner/cleanup_test.go (new): 7 tests for CleanupLogs covering age-based deletion, count-based trimming (oldest removed, newest kept), non-.log files and subdirs are never touched, and zero-limit behaviour. - src/ui/jobs_view_test.go (new): 6 tests for filteredJobIndexes, folderOptions, and filterValue — the folder filter logic is now verified without Fyne widget interaction. - src/storage/store_test.go: two new tests — legacy pysentry.yaml migration and first-run default creation. - src/app/operations_test.go: TestRunDueSkipsJobInRunningState confirms RunDue honours the LastState == "Running" guard and refuses a second concurrent run even when NextDue is in the past. - docs/REFACTORING.md: mark T5.3 complete. - docs/TESTS.md: retire the covered gaps; update package path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-9
@@ -1,6 +1,6 @@
|
||||
# GoSentry Test Suite
|
||||
|
||||
All tests are located alongside source code in the `src/core/` package. Tests follow Go conventions with `*_test.go` filename patterns.
|
||||
All tests are located alongside source code in their respective packages under `src/`. Tests follow Go conventions with `*_test.go` filename patterns.
|
||||
|
||||
## Running Tests
|
||||
|
||||
@@ -172,12 +172,7 @@ Tests Linux autostart entry creation via XDG Desktop Entry files.
|
||||
|
||||
---
|
||||
|
||||
## Future Test Coverage Gaps
|
||||
## Remaining Test Coverage Gaps
|
||||
|
||||
Potential areas for additional tests:
|
||||
- Job group/folder filtering and persistence
|
||||
- Log cleanup (max file count and max age)
|
||||
- Settings persistence and migration
|
||||
- GUI integration tests (currently untested)
|
||||
- Concurrent job execution
|
||||
- Job history and run record storage
|
||||
- GUI integration tests — Fyne widget interaction is not yet tested
|
||||
- Job history and run record storage — on-disk run-record retrieval not covered
|
||||
|
||||
Reference in New Issue
Block a user