mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
chore: use both scrape protocols in config
Signed-off-by: Manik Rana <manikrana54@gmail.com>
This commit is contained in:
parent
5f7bcff912
commit
8f088845d1
|
@ -811,14 +811,6 @@ func TestManagerCTZeroIngestion(t *testing.T) {
|
||||||
)
|
)
|
||||||
require.NoError(t, err)
|
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{
|
require.NoError(t, scrapeManager.ApplyConfig(&config.Config{
|
||||||
GlobalConfig: config.GlobalConfig{
|
GlobalConfig: config.GlobalConfig{
|
||||||
// Disable regular scrapes.
|
// Disable regular scrapes.
|
||||||
|
@ -826,7 +818,7 @@ func TestManagerCTZeroIngestion(t *testing.T) {
|
||||||
ScrapeTimeout: model.Duration(5 * time.Second),
|
ScrapeTimeout: model.Duration(5 * time.Second),
|
||||||
// Ensure the proto is chosen. We need proto as it's the only protocol
|
// Ensure the proto is chosen. We need proto as it's the only protocol
|
||||||
// with the CT parsing support.
|
// with the CT parsing support.
|
||||||
ScrapeProtocols: scrapeProtoConfig,
|
ScrapeProtocols: []config.ScrapeProtocol{config.PrometheusProto, config.OpenMetricsText1_0_0},
|
||||||
},
|
},
|
||||||
ScrapeConfigs: []*config.ScrapeConfig{{JobName: "test"}},
|
ScrapeConfigs: []*config.ScrapeConfig{{JobName: "test"}},
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in a new issue