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:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user