fix test file

Signed-off-by: zhaowang <zhaowang@apac.freewheel.com>
This commit is contained in:
zhaowang 2024-09-29 10:05:22 +08:00
parent 7a458ef01c
commit b3972bbc1a
3 changed files with 6 additions and 4 deletions

View file

@ -553,7 +553,7 @@ func TestCheckRules(t *testing.T) {
},
} {
t.Run("config-lint-fatal", func(t *testing.T) {
_, err := checkConfig(false, "./testdata/prometheus-config.lint.yml", false, newLintConfig(lintOptionLongScrapeInterval, false, c.lookbackDelta))
_, err := checkConfig(false, "./testdata/prometheus-config.lint.long_scrape_interval.yml", false, newLintConfig(lintOptionLongScrapeInterval, false, c.lookbackDelta))
var errMsg string
if err != nil {
errMsg = err.Error()

View file

@ -0,0 +1,3 @@
scrape_configs:
- job_name: long_scrape_interval_test
scrape_interval: 10m

View file

@ -1,3 +1,2 @@
scrape_configs:
- job_name: long_scrape_interval_test
scrape_interval: 10m
rule_files:
- prometheus-rules.lint.yml