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")