1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-09 05:34:21 +00:00

test: add formatUnusedTime tests and fix duplicate comment

Add unit tests for formatUnusedTime in cmd/analyze/format_test.go:
- Zero time (time.Time{}) returns empty string
- Recent files (< 90 days) return empty string
- Boundary tests at 89/90 days threshold
- Month formatting (3mo, 4mo, 6mo, 11mo, 12mo)
- Year formatting (1yr, 2yr, 3yr)
- Boundary tests at year transitions

Also remove duplicate "Memory pressure penalty" comment in
cmd/status/metrics_health.go (line 72-73).
This commit is contained in:
Dylan Joss
2026-01-21 22:42:13 -08:00
parent a8a9b2f4f6
commit 217eb986e2
2 changed files with 39 additions and 1 deletions

View File

@@ -69,7 +69,6 @@ func calculateHealthScore(cpu CPUStatus, mem MemoryStatus, disks []DiskStatus, d
issues = append(issues, "High Memory")
}
// Memory pressure penalty.
// Memory pressure penalty.
switch mem.Pressure {
case "warn":