From 0d2fa08d28d4767f4b2821f0694380f42c844c15 Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Fri, 10 Jan 2025 17:40:43 -0300 Subject: [PATCH] lint Signed-off-by: Arthur Silva Sens --- receiver/prometheusreceiver/factory_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/receiver/prometheusreceiver/factory_test.go b/receiver/prometheusreceiver/factory_test.go index 9f52e9310d20..3a21e0337591 100644 --- a/receiver/prometheusreceiver/factory_test.go +++ b/receiver/prometheusreceiver/factory_test.go @@ -74,8 +74,9 @@ func TestDefaultFallbackScrapeProtocol(t *testing.T) { require.NoError(t, err) assert.NoError(t, sub.Unmarshal(cfg)) - factory.CreateMetrics(context.Background(), receivertest.NewNopSettings(), cfg, consumertest.NewNop()) - + _, err = factory.CreateMetrics(context.Background(), receivertest.NewNopSettings(), cfg, consumertest.NewNop()) + require.NoError(t, err) + // During receiver creation, scrapeconfig without fallback scrape protocol set, should be set to 'PrometheusText1.0.0'. assert.Equal(t, promconfig.PrometheusText1_0_0, cfg.(*Config).PrometheusConfig.ScrapeConfigs[0].ScrapeFallbackProtocol) assert.Equal(t, promconfig.OpenMetricsText1_0_0, cfg.(*Config).PrometheusConfig.ScrapeConfigs[1].ScrapeFallbackProtocol)