From 8f088845d19a8241ec8bb9f581f1b5a3f30e7e79 Mon Sep 17 00:00:00 2001 From: Manik Rana Date: Sat, 31 Aug 2024 09:53:39 +0530 Subject: [PATCH] chore: use both scrape protocols in config Signed-off-by: Manik Rana --- scrape/manager_test.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scrape/manager_test.go b/scrape/manager_test.go index 19755acfcd..327dc68572 100644 --- a/scrape/manager_test.go +++ b/scrape/manager_test.go @@ -811,14 +811,6 @@ func TestManagerCTZeroIngestion(t *testing.T) { ) require.NoError(t, err) - var scrapeProtoConfig []config.ScrapeProtocol - switch tc.typ { - case "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited": - scrapeProtoConfig = []config.ScrapeProtocol{config.PrometheusProto} - case "application/openmetrics-text; version=1.0.0": - scrapeProtoConfig = []config.ScrapeProtocol{config.OpenMetricsText1_0_0} - } - require.NoError(t, scrapeManager.ApplyConfig(&config.Config{ GlobalConfig: config.GlobalConfig{ // Disable regular scrapes. @@ -826,7 +818,7 @@ func TestManagerCTZeroIngestion(t *testing.T) { ScrapeTimeout: model.Duration(5 * time.Second), // Ensure the proto is chosen. We need proto as it's the only protocol // with the CT parsing support. - ScrapeProtocols: scrapeProtoConfig, + ScrapeProtocols: []config.ScrapeProtocol{config.PrometheusProto, config.OpenMetricsText1_0_0}, }, ScrapeConfigs: []*config.ScrapeConfig{{JobName: "test"}}, }))