From 6ed152e2f5b34c8a3424276634b8ed9aa065f97b Mon Sep 17 00:00:00 2001 From: Sundara Gurunathan <105081231+sundar-pds@users.noreply.github.com> Date: Thu, 3 Dec 2026 07:59:26 -0800 Subject: [PATCH] tests: e2e: allow nic_total in the exporter configmap filter check (#378) (cherry picked from commit 857b5c1d33ec131af5857739e7292ceff66ff231) --- tests/e2e/exporter_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e/exporter_test.go b/tests/e2e/exporter_test.go index d75d5cc9..4dd96e59 100644 --- a/tests/e2e/exporter_test.go +++ b/tests/e2e/exporter_test.go @@ -129,7 +129,9 @@ func (s *E2ESuite) TestExporterConfigmap(c *C) { defer s.cleanupQueryClientPod(netCfg.Namespace, c) s.verifyMetricsPresentViaSvcSimple(netCfg, v1alpha1.ServiceTypeClusterIP, fieldsAndLabels, clientPod, c) - s.verifyMetricsNotPresentViaSvcSimple(netCfg, v1alpha1.ServiceTypeClusterIP, cmFields, clientPod, c) + // nic_total is a NIC-count metric the exporter always publishes. NICConfig.Fields + // does not suppress it, so it is allowed alongside the configured fields. + s.verifyMetricsNotPresentViaSvcSimple(netCfg, v1alpha1.ServiceTypeClusterIP, append(cmFields, "nic_total"), clientPod, c) } // TestExporterNICClients tests verification of NIC metrics from various NIC clients