From 4256d1e63c07507c8d45e581fceed58c2d9c19cf Mon Sep 17 00:00:00 2001 From: rcourtman Date: Thu, 5 Feb 2026 12:17:44 +0000 Subject: [PATCH] Cover PDF recommendation defaults --- pkg/reporting/pdf_insights_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkg/reporting/pdf_insights_test.go b/pkg/reporting/pdf_insights_test.go index c9c7703ab..982b93d03 100644 --- a/pkg/reporting/pdf_insights_test.go +++ b/pkg/reporting/pdf_insights_test.go @@ -98,6 +98,26 @@ func TestGenerateRecommendations_Underutilized(t *testing.T) { assertStringSliceContains(t, recs, "underutilized") } +func TestGenerateRecommendations_DefaultMessage(t *testing.T) { + g := NewPDFGenerator() + data := &ReportData{} + + recs := g.generateRecommendations(data, 0, 0) + assertStringSliceContains(t, recs, "No immediate action required") +} + +func TestGenerateRecommendations_UsageMetric(t *testing.T) { + g := NewPDFGenerator() + data := &ReportData{ + Summary: MetricSummary{ByMetric: map[string]MetricStats{ + "usage": {Avg: 90, Max: 95}, + }}, + } + + recs := g.generateRecommendations(data, 0, 0) + assertStringSliceContains(t, recs, "Clean up disk space") +} + func TestGetStatColor(t *testing.T) { if got := getStatColor(95); got != colorDanger { t.Fatalf("expected danger color")