From 1a319c3c3002d26dd8d7d5ca7d879f1e6135611c Mon Sep 17 00:00:00 2001 From: aaa5kameric Date: Tue, 15 Oct 2024 11:53:15 +0200 Subject: [PATCH] metric deletion test comments update --- internal/certmonitor/certmonitor_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/certmonitor/certmonitor_test.go b/internal/certmonitor/certmonitor_test.go index fe40080f2..e17cdfd6b 100644 --- a/internal/certmonitor/certmonitor_test.go +++ b/internal/certmonitor/certmonitor_test.go @@ -290,7 +290,7 @@ func TestCertMonitor_secretMatches(t *testing.T) { } } -// TestCertMonitor func tests certificates event handlers + prometheus metrics handling +// TestCertMonitor_Secret tests that secret event handlers correctly populate prometheus metrics func TestCertMonitor_Secret(t *testing.T) { fleetshardmetrics.MetricsInstance().CertificatesExpiry.Reset() @@ -345,6 +345,7 @@ func TestCertMonitor_Secret(t *testing.T) { verifyPrometheusMetricDelete(t, "namespace-1", "secret-1", "tls.crt") } +// TestCertMonitor_Namespace tests that namespace secret handlers remove prometheus metrics when the namespace is deleted func TestCertMonitor_Namespace(t *testing.T) { fleetshardmetrics.MetricsInstance().CertificatesExpiry.Reset()