Skip to content

Commit

Permalink
PMM-13020 fix scrape config test
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Apr 23, 2024
1 parent 94e43d4 commit 38a3008
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions managed/services/victoriametrics/scrape_configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "node_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "node_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -98,7 +98,7 @@ func TestScrapeConfig(t *testing.T) {
"vmstat",
}},
}, {
JobName: "node_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "node_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -127,7 +127,7 @@ func TestScrapeConfig(t *testing.T) {
"textfile.mr",
}},
}, {
JobName: "node_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "node_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -189,7 +189,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "node_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "node_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -258,7 +258,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -292,7 +292,7 @@ func TestScrapeConfig(t *testing.T) {
"standard.process",
}},
}, {
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -331,7 +331,7 @@ func TestScrapeConfig(t *testing.T) {
"slave_status",
}},
}, {
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -412,7 +412,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -445,7 +445,7 @@ func TestScrapeConfig(t *testing.T) {
"standard.process",
}},
}, {
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -482,7 +482,7 @@ func TestScrapeConfig(t *testing.T) {
"slave_status",
}},
}, {
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -559,7 +559,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -590,7 +590,7 @@ func TestScrapeConfig(t *testing.T) {
"standard.process",
}},
}, {
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -625,7 +625,7 @@ func TestScrapeConfig(t *testing.T) {
"slave_status",
}},
}, {
JobName: "mysqld_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "mysqld_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -717,7 +717,7 @@ func TestScrapeConfig(t *testing.T) {

expected := []*config.ScrapeConfig{
{
JobName: "mongodb_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "mongodb_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -747,7 +747,7 @@ func TestScrapeConfig(t *testing.T) {
}},
},
}, {
JobName: "mongodb_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "mongodb_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -835,7 +835,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "postgres_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
JobName: "postgres_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_hr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -868,7 +868,7 @@ func TestScrapeConfig(t *testing.T) {
"standard.go",
}},
}, {
JobName: "postgres_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "postgres_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.MR),
ScrapeTimeout: scrapeTimeout(s.MR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -898,7 +898,7 @@ func TestScrapeConfig(t *testing.T) {
"custom_query.mr",
}},
}, {
JobName: "postgres_exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
JobName: "postgres_exporter75bb30d3-ef4a-4147-97a8-621a996611dd_lr",
ScrapeInterval: config.Duration(s.LR),
ScrapeTimeout: scrapeTimeout(s.LR),
MetricsPath: "/metrics",
Expand Down Expand Up @@ -1162,7 +1162,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "external-exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "external-exporter75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
ServiceDiscoveryConfig: config.ServiceDiscoveryConfig{
Expand Down Expand Up @@ -1210,7 +1210,7 @@ func TestScrapeConfig(t *testing.T) {
}

expected := []*config.ScrapeConfig{{
JobName: "external-exporter_75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
JobName: "external-exporter75bb30d3-ef4a-4147-97a8-621a996611dd_mr",
ScrapeInterval: config.Duration(s.HR),
ScrapeTimeout: scrapeTimeout(s.HR),
MetricsPath: "/some-metric-path",
Expand Down

0 comments on commit 38a3008

Please sign in to comment.