prometheus/cmd/promtool/testdata
Arve Knudsen 92ccadc96d
Some checks are pending
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
promtool: generate rulesLintConfig when --lint=none is set (#17414)
* Correctly generate rulesLintConfig when --lint=none is set (#17399)

If I run promtool check config --lint=none I get:

```
Checking rules.yml
  FAILED:
rules.yml: unset nameValidationScheme
```

This is because passing --lint=none stops newConfigLintConfig from generating rulesLintConfig which is needed for validation.
It means that defaults are used then, one of which is unset value for metric name validation, causing this error.
Fix this by handling --lint=none case correctly and still generating rulesLintConfig.

---------

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2025-10-28 14:34:52 +01:00
..
at-modifier-test.yml Promtool: Add feature flags to unit tests (#8958) 2021-06-30 22:43:39 +01:00
at-modifier.yml Promtool: Add feature flags to unit tests (#8958) 2021-06-30 22:43:39 +01:00
authorization_credentials_file.bad.yml promtool: Fix credentials file check (#9883) 2021-11-30 15:02:07 +11:00
authorization_credentials_file.good.yml promtool: Fix credentials file check (#9883) 2021-11-30 15:02:07 +11:00
bad-input-series.yml promtool: Calculate mint and maxt per test (#8096) 2020-10-24 12:03:55 +01:00
bad-promql.yml fixes yamllint errors 2021-06-12 12:47:47 +02:00
bad-rules-error-test.yml Fix misspelled word in comment (#8348) 2021-01-07 10:01:08 +00:00
bad-rules-error.yml promtool: Calculate mint and maxt per test (#8096) 2020-10-24 12:03:55 +01:00
bad-rules-syntax-test.yml promtool: Calculate mint and maxt per test (#8096) 2020-10-24 12:03:55 +01:00
bad-rules-syntax.yml promtool: Calculate mint and maxt per test (#8096) 2020-10-24 12:03:55 +01:00
bad-sd-file-extension.nonexistent Fix typos (#16076) 2025-02-28 11:24:25 +11:00
bad-sd-file-format.yml Promtool: Validate service discovery files (#8950) 2021-06-29 17:32:59 +02:00
config_with_rule_files.yml promtool: Add --syntax-only flag for check config 2021-12-02 15:33:11 -05:00
config_with_service_discovery_files.yml Disallowing configure AM with the v1 api (#13883) 2024-10-18 15:23:14 +02:00
config_with_tls_files.yml promtool: Add --syntax-only flag for check config 2021-12-02 15:33:11 -05:00
dump-openmetrics-roundtrip-test.prom promtool: add a "tsdb dump-openmetrics" to dump in OpemMetrics format. 2024-02-28 15:34:18 +01:00
dump-openmetrics-test.prom promtool: add a "tsdb dump-openmetrics" to dump in OpemMetrics format. 2024-02-28 15:34:18 +01:00
dump-test-1.prom promtool: allow setting multiple matchers to "promtool tsdb dump" command. (#13296) 2024-01-15 10:29:53 +00:00
dump-test-2.prom promtool: allow setting multiple matchers to "promtool tsdb dump" command. (#13296) 2024-01-15 10:29:53 +00:00
dump-test-3.prom promtool: allow setting multiple matchers to "promtool tsdb dump" command. (#13296) 2024-01-15 10:29:53 +00:00
failing.yml promtool: Add more negative alert tests 2021-02-15 17:00:49 +00:00
features.yml promtool: Add feature flags for promql features (#16443) 2025-04-17 10:29:44 +01:00
good-sd-file.json Promtool: Validate service discovery files (#8950) 2021-06-29 17:32:59 +02:00
good-sd-file.yaml Promtool: Validate service discovery files (#8950) 2021-06-29 17:32:59 +02:00
good-sd-file.yml Promtool: Validate service discovery files (#8950) 2021-06-29 17:32:59 +02:00
long-period.yml Disable time based retention in tests (#8818) 2022-01-02 23:46:03 +01:00
metrics-test.prom Add '--weight' flag to 'promtool check metrics' command (#10045) 2022-01-07 16:58:28 -05:00
negative-offset-test.yml Promtool: Add feature flags to unit tests (#8958) 2021-06-30 22:43:39 +01:00
negative-offset.yml Promtool: Add feature flags to unit tests (#8958) 2021-06-30 22:43:39 +01:00
no-test-group-interval.yml Fix yaml file format and clear ci errors 2024-03-21 11:32:02 +08:00
prometheus-config.bad.yml Fix promtool check config not erroring properly on failures (#10952) 2022-07-01 14:38:49 +02:00
prometheus-config.good.yml Fix promtool check config not erroring properly on failures (#10952) 2022-07-01 14:38:49 +02:00
prometheus-config.lint.too_long_scrape_interval.yml promtool: generate rulesLintConfig when --lint=none is set (#17414) 2025-10-28 14:34:52 +01:00
prometheus-config.lint.yml Fix promtool check config not erroring properly on failures (#10952) 2022-07-01 14:38:49 +02:00
prometheus-config.rules.good.yml promtool: generate rulesLintConfig when --lint=none is set (#17414) 2025-10-28 14:34:52 +01:00
prometheus-rules.lint.yml Fix promtool check config not erroring properly on failures (#10952) 2022-07-01 14:38:49 +02:00
rules-bad.yml Fix rule check broken (#12715) 2023-09-25 17:48:05 +10:00
rules.yml Fix subqueries with default resolution in promql unit tests 2021-03-07 09:20:04 +01:00
rules_duplicates.yml promtool: Add testcase for detecting duplicates 2021-09-06 23:10:26 +08:00
rules_extrafields.yml promtool: add --ignore-unknown-fields 2025-01-15 11:34:28 +02:00
rules_large.yml promtool: Add simple benchmark checkDuplicates benchmark 2021-09-06 23:10:26 +08:00
rules_run.yml Add --run flag to promtool test rules 2023-06-28 17:57:32 +01:00
rules_run_extrafields.yml promtool: add --ignore-unknown-fields 2025-01-15 11:34:28 +02:00
rules_run_fuzzy.yml promtool: Optional fuzzy float64 comparison in rules unittests (#16395) 2025-05-01 17:58:12 +10:00
rules_run_no_fuzzy.yml promtool: Optional fuzzy float64 comparison in rules unittests (#16395) 2025-05-01 17:58:12 +10:00
unittest.yml Merge pull request #14820 from charleskorn/promqltest-native-histogram-format 2024-09-20 16:47:08 +02:00
url_in_alert_targetgroup_with_relabel_config.bad.yml Expose TargetsFromGroup/AlertmanagerFromGroup func and reuse this for (#9343) 2021-10-28 02:01:28 +02:00
url_in_alert_targetgroup_with_relabel_config.good.yml Expose TargetsFromGroup/AlertmanagerFromGroup func and reuse this for (#9343) 2021-10-28 02:01:28 +02:00
url_in_scrape_targetgroup_with_relabel_config.bad.yml Expose TargetsFromGroup/AlertmanagerFromGroup func and reuse this for (#9343) 2021-10-28 02:01:28 +02:00
url_in_scrape_targetgroup_with_relabel_config.good.yml Expose TargetsFromGroup/AlertmanagerFromGroup func and reuse this for (#9343) 2021-10-28 02:01:28 +02:00