diff --git a/cmd/pint/main_test.go b/cmd/pint/main_test.go index d53b48d4..17047993 100644 --- a/cmd/pint/main_test.go +++ b/cmd/pint/main_test.go @@ -25,33 +25,17 @@ import ( "github.com/rogpeppe/go-internal/testscript" ) -// mock command that fails tests if error is returned. -func mockMainShouldSucceed() int { - app := newApp() - err := app.Run(os.Args) - if err != nil { - slog.Error("Fatal error", slog.Any("err", err)) - return 1 - } - return 0 -} - -// mock command that fails tests if no error is returned. -func mockMainShouldFail() int { - app := newApp() - err := app.Run(os.Args) - if err != nil { - slog.Error("Fatal error", slog.Any("err", err)) - return 0 - } - fmt.Fprintf(os.Stderr, "expected an error but none was returned\n") - return 1 -} - func TestMain(m *testing.M) { os.Exit(testscript.RunMain(m, map[string]func() int{ - "pint.ok": mockMainShouldSucceed, - "pint.error": mockMainShouldFail, + "pint": func() int { + app := newApp() + err := app.Run(os.Args) + if err != nil { + slog.Error("Fatal error", slog.Any("err", err)) + return 1 + } + return 0 + }, })) } diff --git a/cmd/pint/tests/0001_match_path.txt b/cmd/pint/tests/0001_match_path.txt index 92deeb65..368d1c7e 100644 --- a/cmd/pint/tests/0001_match_path.txt +++ b/cmd/pint/tests/0001_match_path.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0002_nothing_to_lint.txt b/cmd/pint/tests/0002_nothing_to_lint.txt index c25539c4..f72d2675 100644 --- a/cmd/pint/tests/0002_nothing_to_lint.txt +++ b/cmd/pint/tests/0002_nothing_to_lint.txt @@ -1,5 +1,5 @@ mkdir rules -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0003_lint_workdir.txt b/cmd/pint/tests/0003_lint_workdir.txt index 71584b14..e455a25d 100644 --- a/cmd/pint/tests/0003_lint_workdir.txt +++ b/cmd/pint/tests/0003_lint_workdir.txt @@ -1,5 +1,5 @@ env NO_COLOR=1 -pint.error --no-color lint --min-severity=info rules +! exec pint --no-color lint --min-severity=info rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0004_fail_invalid_yaml.txt b/cmd/pint/tests/0004_fail_invalid_yaml.txt index dd82ac6d..34c4b9b6 100644 --- a/cmd/pint/tests/0004_fail_invalid_yaml.txt +++ b/cmd/pint/tests/0004_fail_invalid_yaml.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0005_false_positive.txt b/cmd/pint/tests/0005_false_positive.txt index d9d53937..9467adb8 100644 --- a/cmd/pint/tests/0005_false_positive.txt +++ b/cmd/pint/tests/0005_false_positive.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint rules +exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0006_rr_labels.txt b/cmd/pint/tests/0006_rr_labels.txt index 4bab8c73..31378d24 100644 --- a/cmd/pint/tests/0006_rr_labels.txt +++ b/cmd/pint/tests/0006_rr_labels.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0007_alerts.txt b/cmd/pint/tests/0007_alerts.txt index 2ebd1758..81c2f7dd 100644 --- a/cmd/pint/tests/0007_alerts.txt +++ b/cmd/pint/tests/0007_alerts.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0008_recording_rule_prometheus.txt b/cmd/pint/tests/0008_recording_rule_prometheus.txt index b8547ceb..64bf9cf9 100644 --- a/cmd/pint/tests/0008_recording_rule_prometheus.txt +++ b/cmd/pint/tests/0008_recording_rule_prometheus.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0009_alerting_rule_prometheus.txt b/cmd/pint/tests/0009_alerting_rule_prometheus.txt index 49879f12..907598f8 100644 --- a/cmd/pint/tests/0009_alerting_rule_prometheus.txt +++ b/cmd/pint/tests/0009_alerting_rule_prometheus.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0010_syntax_check.txt b/cmd/pint/tests/0010_syntax_check.txt index 4ee0f2a7..568476ad 100644 --- a/cmd/pint/tests/0010_syntax_check.txt +++ b/cmd/pint/tests/0010_syntax_check.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0011_ignore_rules.txt b/cmd/pint/tests/0011_ignore_rules.txt index de940fde..328cbd75 100644 --- a/cmd/pint/tests/0011_ignore_rules.txt +++ b/cmd/pint/tests/0011_ignore_rules.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0012_issue_20.txt b/cmd/pint/tests/0012_issue_20.txt index 4ff1f23e..5a7bb374 100644 --- a/cmd/pint/tests/0012_issue_20.txt +++ b/cmd/pint/tests/0012_issue_20.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint rules +exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0013_issue49_1.txt b/cmd/pint/tests/0013_issue49_1.txt index a6f1ee40..01a34f0c 100644 --- a/cmd/pint/tests/0013_issue49_1.txt +++ b/cmd/pint/tests/0013_issue49_1.txt @@ -1,4 +1,4 @@ -pint.error --no-color --config not_existed_config.hcl lint rules +! exec pint --no-color --config not_existed_config.hcl lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0014_issue49_2.txt b/cmd/pint/tests/0014_issue49_2.txt index e348a578..84e2e0c4 100644 --- a/cmd/pint/tests/0014_issue49_2.txt +++ b/cmd/pint/tests/0014_issue49_2.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint rules +exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0015_parse_1.txt b/cmd/pint/tests/0015_parse_1.txt index f308e42d..5fa7663f 100644 --- a/cmd/pint/tests/0015_parse_1.txt +++ b/cmd/pint/tests/0015_parse_1.txt @@ -1,4 +1,4 @@ -pint.ok parse 'sum(rate(foo[5m])) without(job) + (sum(rate(bar[5m])) without(job) > 0)' +exec pint parse 'sum(rate(foo[5m])) without(job) + (sum(rate(bar[5m])) without(job) > 0)' cmp stdout stdout.txt ! stderr . diff --git a/cmd/pint/tests/0016_parse_2.txt b/cmd/pint/tests/0016_parse_2.txt index dd512e22..f3e32303 100644 --- a/cmd/pint/tests/0016_parse_2.txt +++ b/cmd/pint/tests/0016_parse_2.txt @@ -1,4 +1,4 @@ -pint.ok parse 'sum(rate(foo[5m:1m])) without(job) / on(instance) group_left() sum(rate(bar[5m])) without(job)' +exec pint parse 'sum(rate(foo[5m:1m])) without(job) / on(instance) group_left() sum(rate(bar[5m])) without(job)' cmp stdout stdout.txt ! stderr . diff --git a/cmd/pint/tests/0017_issue69.txt b/cmd/pint/tests/0017_issue69.txt index 91141249..53d3abda 100644 --- a/cmd/pint/tests/0017_issue69.txt +++ b/cmd/pint/tests/0017_issue69.txt @@ -1,6 +1,6 @@ exec sh ./copy.sh exec sh ./ulimit.sh -pint.error --no-color -l error lint rules +! exec pint --no-color -l error lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0018_match_alerting.txt b/cmd/pint/tests/0018_match_alerting.txt index 9742cf68..60a8293b 100644 --- a/cmd/pint/tests/0018_match_alerting.txt +++ b/cmd/pint/tests/0018_match_alerting.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -l debug lint rules +exec pint --no-color -l debug lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0019_match_recording.txt b/cmd/pint/tests/0019_match_recording.txt index b0cae3d7..77bc6376 100644 --- a/cmd/pint/tests/0019_match_recording.txt +++ b/cmd/pint/tests/0019_match_recording.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -l debug lint rules +exec pint --no-color -l debug lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0020_ignore_kind.txt b/cmd/pint/tests/0020_ignore_kind.txt index d0fb375d..07d33482 100644 --- a/cmd/pint/tests/0020_ignore_kind.txt +++ b/cmd/pint/tests/0020_ignore_kind.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -l debug lint rules +exec pint --no-color -l debug lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0021_ignore_all.txt b/cmd/pint/tests/0021_ignore_all.txt index f766797a..7fa1ddec 100644 --- a/cmd/pint/tests/0021_ignore_all.txt +++ b/cmd/pint/tests/0021_ignore_all.txt @@ -1,4 +1,4 @@ -pint.error --no-color -l debug lint rules +! exec pint --no-color -l debug lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0022_ignore_multi.txt b/cmd/pint/tests/0022_ignore_multi.txt index 925fb629..d26c6d08 100644 --- a/cmd/pint/tests/0022_ignore_multi.txt +++ b/cmd/pint/tests/0022_ignore_multi.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint rules +exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0023_enabled_checks.txt b/cmd/pint/tests/0023_enabled_checks.txt index af50ce7c..6a645282 100644 --- a/cmd/pint/tests/0023_enabled_checks.txt +++ b/cmd/pint/tests/0023_enabled_checks.txt @@ -1,4 +1,4 @@ -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . stderr 'level=DEBUG msg="Configured checks for rule" enabled=\["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp","promql/rate\(prom\)","promql/series\(prom\)","promql/vector_matching\(prom\)"\,"promql/range_query\(prom\)","rule/duplicate\(prom\)","labels/conflict\(prom\)","alerts/external_labels\(prom\)","promql/counter\(prom\)","alerts/absent\(prom\)"] path=rules/1.yaml rule=one' stderr 'level=DEBUG msg="Configured checks for rule" enabled=\["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp","promql/rate\(prom\)","promql/series\(prom\)","promql/vector_matching\(prom\)"\,"promql/range_query\(prom\)","rule/duplicate\(prom\)","labels/conflict\(prom\)","alerts/external_labels\(prom\)","promql/counter\(prom\)","alerts/absent\(prom\)"] path=rules/1.yaml rule=two' diff --git a/cmd/pint/tests/0024_color_output.txt b/cmd/pint/tests/0024_color_output.txt index cebeee11..8625c99a 100644 --- a/cmd/pint/tests/0024_color_output.txt +++ b/cmd/pint/tests/0024_color_output.txt @@ -1,5 +1,5 @@ env NO_COLOR=0 -pint.error lint rules +! exec pint lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0025_config.txt b/cmd/pint/tests/0025_config.txt index ea589e7f..b44937e7 100644 --- a/cmd/pint/tests/0025_config.txt +++ b/cmd/pint/tests/0025_config.txt @@ -1,6 +1,6 @@ cert $WORK prom -pint.ok --no-color config +exec pint --no-color config ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0026_aggregate_empty_name.txt b/cmd/pint/tests/0026_aggregate_empty_name.txt index 340a3f11..0f4b802b 100644 --- a/cmd/pint/tests/0026_aggregate_empty_name.txt +++ b/cmd/pint/tests/0026_aggregate_empty_name.txt @@ -1,4 +1,4 @@ -pint.error --no-color config +! exec pint --no-color config ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0027_ci_branch.txt b/cmd/pint/tests/0027_ci_branch.txt index 7b59ba65..1ec9ed53 100644 --- a/cmd/pint/tests/0027_ci_branch.txt +++ b/cmd/pint/tests/0027_ci_branch.txt @@ -15,7 +15,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error --no-color ci +! exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0028_ci_git_error.txt b/cmd/pint/tests/0028_ci_git_error.txt index 0dd931e8..fec298a5 100644 --- a/cmd/pint/tests/0028_ci_git_error.txt +++ b/cmd/pint/tests/0028_ci_git_error.txt @@ -15,7 +15,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error -l debug --no-color ci +! exec pint -l debug --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0029_ci_too_many_commits.txt b/cmd/pint/tests/0029_ci_too_many_commits.txt index 0144e49b..c4330404 100644 --- a/cmd/pint/tests/0029_ci_too_many_commits.txt +++ b/cmd/pint/tests/0029_ci_too_many_commits.txt @@ -22,7 +22,7 @@ exec git commit -am 'recert to v1' cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error --no-color ci +! exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0030_parse_string.txt b/cmd/pint/tests/0030_parse_string.txt index e18a90ff..05d97ed5 100644 --- a/cmd/pint/tests/0030_parse_string.txt +++ b/cmd/pint/tests/0030_parse_string.txt @@ -1,4 +1,4 @@ -pint.ok parse '"foo"' +exec pint parse '"foo"' cmp stdout stdout.txt ! stderr . diff --git a/cmd/pint/tests/0031_ci_bitbucket.txt b/cmd/pint/tests/0031_ci_bitbucket.txt index c1f1eec9..3884fa74 100644 --- a/cmd/pint/tests/0031_ci_bitbucket.txt +++ b/cmd/pint/tests/0031_ci_bitbucket.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.ok -l debug --no-color ci +exec pint -l debug --no-color ci ! stdout . stderr 'msg="Sending a request to BitBucket" method=PUT' stderr 'msg="BitBucket request completed" status=200' diff --git a/cmd/pint/tests/0032_ci_github.txt b/cmd/pint/tests/0032_ci_github.txt index decac70a..e29941bf 100644 --- a/cmd/pint/tests/0032_ci_github.txt +++ b/cmd/pint/tests/0032_ci_github.txt @@ -24,7 +24,7 @@ exec git commit -am 'v2' env GITHUB_AUTH_TOKEN=12345 env GITHUB_PULL_REQUEST_NUMBER=1 -pint.ok -l debug --offline --no-color ci +exec pint -l debug --offline --no-color ci ! stdout . stderr 'level=INFO msg="Pull request review created" status="200 OK"' diff --git a/cmd/pint/tests/0033_ci_github_multi.txt b/cmd/pint/tests/0033_ci_github_multi.txt index 997c1e35..95edf05e 100644 --- a/cmd/pint/tests/0033_ci_github_multi.txt +++ b/cmd/pint/tests/0033_ci_github_multi.txt @@ -24,7 +24,7 @@ exec git commit -am 'v2' env GITHUB_AUTH_TOKEN=12345 env GITHUB_PULL_REQUEST_NUMBER=1 -pint.error -l debug --no-color ci +! exec pint -l debug --no-color ci ! stdout . stderr 'level=INFO msg="Pull request review created" status="200 OK"' diff --git a/cmd/pint/tests/0034_version.txt b/cmd/pint/tests/0034_version.txt index b906a005..fb8fad7d 100644 --- a/cmd/pint/tests/0034_version.txt +++ b/cmd/pint/tests/0034_version.txt @@ -1,4 +1,4 @@ -pint.ok version +exec pint version cmp stdout stdout.txt ! stderr . diff --git a/cmd/pint/tests/0035_bad_loglevel.txt b/cmd/pint/tests/0035_bad_loglevel.txt index 00463515..69ca5afa 100644 --- a/cmd/pint/tests/0035_bad_loglevel.txt +++ b/cmd/pint/tests/0035_bad_loglevel.txt @@ -1,3 +1,3 @@ -pint.error -l invalid --no-color lint rules +! exec pint -l invalid --no-color lint rules ! stdout . stderr 'ERROR Fatal error err="failed to set log level: ''invalid'' is not a valid log level"' diff --git a/cmd/pint/tests/0036_ci_basebranch.txt b/cmd/pint/tests/0036_ci_basebranch.txt index 1262d2b4..f2f3e1c1 100644 --- a/cmd/pint/tests/0036_ci_basebranch.txt +++ b/cmd/pint/tests/0036_ci_basebranch.txt @@ -11,7 +11,7 @@ env GIT_COMMITTER_EMAIL=pint@example.com exec git add . exec git commit -am 'import rules and config' -pint.ok --no-color ci +exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0037_disable_checks.txt b/cmd/pint/tests/0037_disable_checks.txt index 99873d41..a90642d4 100644 --- a/cmd/pint/tests/0037_disable_checks.txt +++ b/cmd/pint/tests/0037_disable_checks.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color -d promql/counter -d alerts/for -d alerts/comparison -d promql/rate(prom) -d promql/series(prom) -d promql/aggregate(prom) -d promql/range_query lint rules +exec pint -l debug --no-color -d promql/counter -d alerts/for -d alerts/comparison -d promql/rate(prom) -d promql/series(prom) -d promql/aggregate(prom) -d promql/range_query lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0038_disable_checks_regex.txt b/cmd/pint/tests/0038_disable_checks_regex.txt index faa8cb02..6013e580 100644 --- a/cmd/pint/tests/0038_disable_checks_regex.txt +++ b/cmd/pint/tests/0038_disable_checks_regex.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -d 'alerts/.*' -d 'promql/c.+' lint rules +exec pint --no-color -d 'alerts/.*' -d 'promql/c.+' lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0039_prom_selected_path.txt b/cmd/pint/tests/0039_prom_selected_path.txt index 55406ac1..8a076e8d 100644 --- a/cmd/pint/tests/0039_prom_selected_path.txt +++ b/cmd/pint/tests/0039_prom_selected_path.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0040_rule_match_label.txt b/cmd/pint/tests/0040_rule_match_label.txt index 91a1b12c..ba3d3018 100644 --- a/cmd/pint/tests/0040_rule_match_label.txt +++ b/cmd/pint/tests/0040_rule_match_label.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -l debug lint rules +exec pint --no-color -l debug lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0041_watch.txt b/cmd/pint/tests/0041_watch.txt index 1446b807..84c4444b 100644 --- a/cmd/pint/tests/0041_watch.txt +++ b/cmd/pint/tests/0041_watch.txt @@ -1,6 +1,6 @@ exec bash -x ./test.sh & -pint.ok --no-color -l debug watch --interval=5s --listen=127.0.0.1:6041 --pidfile=pint.pid glob rules +exec pint --no-color -l debug watch --interval=5s --listen=127.0.0.1:6041 --pidfile=pint.pid glob rules ! stdout . stderr 'level=INFO msg="Pidfile created" path=pint.pid' diff --git a/cmd/pint/tests/0042_watch_metrics.txt b/cmd/pint/tests/0042_watch_metrics.txt index 41af53b8..c77feb93 100644 --- a/cmd/pint/tests/0042_watch_metrics.txt +++ b/cmd/pint/tests/0042_watch_metrics.txt @@ -1,6 +1,6 @@ exec bash -x ./test.sh & -pint.ok watch --listen=127.0.0.1:6042 --pidfile=pint.pid glob rules +exec pint watch --listen=127.0.0.1:6042 --pidfile=pint.pid glob rules cmp curl.txt metrics.txt -- test.sh -- diff --git a/cmd/pint/tests/0043_watch_cancel.txt b/cmd/pint/tests/0043_watch_cancel.txt index 85ffb547..fc2ddf94 100644 --- a/cmd/pint/tests/0043_watch_cancel.txt +++ b/cmd/pint/tests/0043_watch_cancel.txt @@ -3,7 +3,7 @@ http start github 127.0.0.1:7043 exec bash -x ./test.sh & -pint.ok --no-color watch --interval=1h --listen=127.0.0.1:6043 --pidfile=pint.pid glob rules +exec pint --no-color watch --interval=1h --listen=127.0.0.1:6043 --pidfile=pint.pid glob rules ! stdout . stderr 'level=INFO msg="Shutting down"' stderr 'level=INFO msg="Waiting for all background tasks to finish"' diff --git a/cmd/pint/tests/0044_parse_error.txt b/cmd/pint/tests/0044_parse_error.txt index 893a9f2d..86ddf2aa 100644 --- a/cmd/pint/tests/0044_parse_error.txt +++ b/cmd/pint/tests/0044_parse_error.txt @@ -1,4 +1,4 @@ -pint.error parse 'sum(foo) by(' +! exec pint parse 'sum(foo) by(' ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0045_parse_no_query.txt b/cmd/pint/tests/0045_parse_no_query.txt index ed944d9f..94fc8ee3 100644 --- a/cmd/pint/tests/0045_parse_no_query.txt +++ b/cmd/pint/tests/0045_parse_no_query.txt @@ -1,4 +1,4 @@ -pint.error --no-color parse +! exec pint --no-color parse ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0046_parse_3.txt b/cmd/pint/tests/0046_parse_3.txt index feb10461..5c0c56ca 100644 --- a/cmd/pint/tests/0046_parse_3.txt +++ b/cmd/pint/tests/0046_parse_3.txt @@ -1,4 +1,4 @@ -pint.ok parse 'sum(http_requests_total{method="GET"} @ 1609746000)' +exec pint parse 'sum(http_requests_total{method="GET"} @ 1609746000)' cmp stdout stdout.txt ! stderr . diff --git a/cmd/pint/tests/0047_parse_4.txt b/cmd/pint/tests/0047_parse_4.txt index ea27da9b..eb629543 100644 --- a/cmd/pint/tests/0047_parse_4.txt +++ b/cmd/pint/tests/0047_parse_4.txt @@ -1,4 +1,4 @@ -pint.ok parse 'rate(http_requests_total[5m] offset -1w)' +exec pint parse 'rate(http_requests_total[5m] offset -1w)' cmp stdout stdout.txt ! stderr . diff --git a/cmd/pint/tests/0048_watch_limit.txt b/cmd/pint/tests/0048_watch_limit.txt index c3588de0..71b1d88a 100644 --- a/cmd/pint/tests/0048_watch_limit.txt +++ b/cmd/pint/tests/0048_watch_limit.txt @@ -1,6 +1,6 @@ exec bash -x ./test.sh & -pint.ok watch --listen=127.0.0.1:6048 --max-problems=2 --pidfile=pint.pid glob rules +exec pint watch --listen=127.0.0.1:6048 --max-problems=2 --pidfile=pint.pid glob rules cmp curl.txt metrics.txt -- test.sh -- diff --git a/cmd/pint/tests/0049_watch_severity_warning.txt b/cmd/pint/tests/0049_watch_severity_warning.txt index caaa8d21..3fee6b2d 100644 --- a/cmd/pint/tests/0049_watch_severity_warning.txt +++ b/cmd/pint/tests/0049_watch_severity_warning.txt @@ -1,6 +1,6 @@ exec bash -x ./test.sh & -pint.ok watch --listen=127.0.0.1:6049 --min-severity=warning --pidfile=pint.pid glob rules +exec pint watch --listen=127.0.0.1:6049 --min-severity=warning --pidfile=pint.pid glob rules cmp curl.txt metrics.txt -- test.sh -- diff --git a/cmd/pint/tests/0050_watch_severity_fatal.txt b/cmd/pint/tests/0050_watch_severity_fatal.txt index 8516b9ab..571927b0 100644 --- a/cmd/pint/tests/0050_watch_severity_fatal.txt +++ b/cmd/pint/tests/0050_watch_severity_fatal.txt @@ -1,6 +1,6 @@ exec bash -x ./test.sh & -pint.ok watch --listen=127.0.0.1:6050 --min-severity=fatal --pidfile=pint.pid glob rules +exec pint watch --listen=127.0.0.1:6050 --min-severity=fatal --pidfile=pint.pid glob rules cmp curl.txt metrics.txt -- test.sh -- diff --git a/cmd/pint/tests/0051_watch_severity_invalid.txt b/cmd/pint/tests/0051_watch_severity_invalid.txt index 4d50559b..d1895e23 100644 --- a/cmd/pint/tests/0051_watch_severity_invalid.txt +++ b/cmd/pint/tests/0051_watch_severity_invalid.txt @@ -1,4 +1,4 @@ -pint.error --no-color watch --min-severity=foo glob bar +! exec pint --no-color watch --min-severity=foo glob bar ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0052_match_multiple.txt b/cmd/pint/tests/0052_match_multiple.txt index 422f8ef5..31be1196 100644 --- a/cmd/pint/tests/0052_match_multiple.txt +++ b/cmd/pint/tests/0052_match_multiple.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -l debug lint rules +exec pint --no-color -l debug lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0053_ignore_multiple.txt b/cmd/pint/tests/0053_ignore_multiple.txt index ee733367..aca74731 100644 --- a/cmd/pint/tests/0053_ignore_multiple.txt +++ b/cmd/pint/tests/0053_ignore_multiple.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -l debug lint rules +exec pint --no-color -l debug lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0054_watch_metrics_prometheus.txt b/cmd/pint/tests/0054_watch_metrics_prometheus.txt index 362cad17..a3ccda0c 100644 --- a/cmd/pint/tests/0054_watch_metrics_prometheus.txt +++ b/cmd/pint/tests/0054_watch_metrics_prometheus.txt @@ -4,7 +4,7 @@ http start prometheus 127.0.0.1:7054 exec bash -x ./test.sh & -pint.ok watch --listen=127.0.0.1:6054 --pidfile=pint.pid glob rules +exec pint watch --listen=127.0.0.1:6054 --pidfile=pint.pid glob rules cmp curl.txt metrics.txt -- test.sh -- diff --git a/cmd/pint/tests/0055_prometheus_failover.txt b/cmd/pint/tests/0055_prometheus_failover.txt index 00c3503d..19d0360b 100644 --- a/cmd/pint/tests/0055_prometheus_failover.txt +++ b/cmd/pint/tests/0055_prometheus_failover.txt @@ -3,7 +3,7 @@ http response prometheus /api/v1/query_range 200 {"status":"success","data":{"re http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[]}} http start prometheus 127.0.0.1:7055 -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . stderr 'level=ERROR msg="Query returned an error" err="Post \\"http://127.0.0.1:1055/api/v1/query\\": dial tcp 127.0.0.1:1055: connect: connection refused" uri=http://127.0.0.1:1055 query=count\(foo\)' stderr 'level=ERROR msg="Query returned an error" err="failed to query Prometheus config: Get \\"http://127.0.0.1:1055/api/v1/status/config\\": dial tcp 127.0.0.1:1055: connect: connection refused" uri=http://127.0.0.1:1055 query=/api/v1/status/config' diff --git a/cmd/pint/tests/0056_prometheus_required.txt b/cmd/pint/tests/0056_prometheus_required.txt index 89059ec2..bb22d66e 100644 --- a/cmd/pint/tests/0056_prometheus_required.txt +++ b/cmd/pint/tests/0056_prometheus_required.txt @@ -1,7 +1,7 @@ http response prometheus / 500 Offline http start prometheus 127.0.0.1:7056 -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . stderr 'level=ERROR msg="Query returned an error" err="server error: 500" uri=http://127.0.0.1:7056 query=count\(up\)' stderr 'level=ERROR msg="Query returned an error" err="server error: 500" uri=http://127.0.0.1:7056 query=/api/v1/status/config' diff --git a/cmd/pint/tests/0057_watch_metrics_prometheus_ignore.txt b/cmd/pint/tests/0057_watch_metrics_prometheus_ignore.txt index 30726bbb..662f2c22 100644 --- a/cmd/pint/tests/0057_watch_metrics_prometheus_ignore.txt +++ b/cmd/pint/tests/0057_watch_metrics_prometheus_ignore.txt @@ -4,7 +4,7 @@ http start prometheus 127.0.0.1:7057 exec bash -x ./test.sh & -pint.ok watch --listen=127.0.0.1:6057 --pidfile=pint.pid glob rules +exec pint watch --listen=127.0.0.1:6057 --pidfile=pint.pid glob rules cmp curl.txt metrics.txt -- test.sh -- diff --git a/cmd/pint/tests/0058_templated_check.txt b/cmd/pint/tests/0058_templated_check.txt index 7328e9aa..e4dc04db 100644 --- a/cmd/pint/tests/0058_templated_check.txt +++ b/cmd/pint/tests/0058_templated_check.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0059_templated_check_bad_template.txt b/cmd/pint/tests/0059_templated_check_bad_template.txt index 47dd32bb..88d94c0e 100644 --- a/cmd/pint/tests/0059_templated_check_bad_template.txt +++ b/cmd/pint/tests/0059_templated_check_bad_template.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0060_ci_noop.txt b/cmd/pint/tests/0060_ci_noop.txt index a87fe974..34e02263 100644 --- a/cmd/pint/tests/0060_ci_noop.txt +++ b/cmd/pint/tests/0060_ci_noop.txt @@ -24,7 +24,7 @@ exec git checkout -b v3 exec git rm a.yml exec git commit -am 'v3' -pint.error --no-color ci +! exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0061_lint_workers_zero.txt b/cmd/pint/tests/0061_lint_workers_zero.txt index 20bff3c8..f3626082 100644 --- a/cmd/pint/tests/0061_lint_workers_zero.txt +++ b/cmd/pint/tests/0061_lint_workers_zero.txt @@ -1,4 +1,4 @@ -pint.error --workers=0 --no-color lint rules +! exec pint --workers=0 --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0062_lint_no_args.txt b/cmd/pint/tests/0062_lint_no_args.txt index 5c465b9d..044bc666 100644 --- a/cmd/pint/tests/0062_lint_no_args.txt +++ b/cmd/pint/tests/0062_lint_no_args.txt @@ -1,4 +1,4 @@ -pint.error --workers=1 --no-color lint +! exec pint --workers=1 --no-color lint ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0063_lint_offline.txt b/cmd/pint/tests/0063_lint_offline.txt index 2f48c5e7..111b6d50 100644 --- a/cmd/pint/tests/0063_lint_offline.txt +++ b/cmd/pint/tests/0063_lint_offline.txt @@ -1,4 +1,4 @@ -pint.ok --offline --no-color lint rules +exec pint --offline --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0064_watch_no_path.txt b/cmd/pint/tests/0064_watch_no_path.txt index d56f30af..4398c2b4 100644 --- a/cmd/pint/tests/0064_watch_no_path.txt +++ b/cmd/pint/tests/0064_watch_no_path.txt @@ -1,4 +1,4 @@ -pint.error --no-color watch --listen=127.0.0.1:6064 glob +! exec pint --no-color watch --listen=127.0.0.1:6064 glob ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0065_ci_include.txt b/cmd/pint/tests/0065_ci_include.txt index 19aae9d7..511d88bc 100644 --- a/cmd/pint/tests/0065_ci_include.txt +++ b/cmd/pint/tests/0065_ci_include.txt @@ -20,7 +20,7 @@ cp ../src/b.yml b.yml exec git add b.yml exec git commit -am 'v2' -pint.ok -l debug --no-color ci +exec pint -l debug --no-color ci ! stdout . stderr 'level=DEBUG msg="Got branch information" base=main current=v2' stderr 'level=DEBUG msg="Git file change" change=A path=a.yml commit=.*' diff --git a/cmd/pint/tests/0066_lint_owner.txt b/cmd/pint/tests/0066_lint_owner.txt index e8f1e10b..7ee75509 100644 --- a/cmd/pint/tests/0066_lint_owner.txt +++ b/cmd/pint/tests/0066_lint_owner.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint --require-owner rules +! exec pint --no-color lint --require-owner rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0067_relaxed.txt b/cmd/pint/tests/0067_relaxed.txt index 44f2e1a8..7a594f01 100644 --- a/cmd/pint/tests/0067_relaxed.txt +++ b/cmd/pint/tests/0067_relaxed.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0068_skip_ci.txt b/cmd/pint/tests/0068_skip_ci.txt index 676009e5..761aa8b8 100644 --- a/cmd/pint/tests/0068_skip_ci.txt +++ b/cmd/pint/tests/0068_skip_ci.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am '[skip ci] v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.ok -l debug --no-color ci +exec pint -l debug --no-color ci ! stdout . stderr 'level=INFO msg="Found a commit with ''\[skip ci\]'', skipping all checks" commit=.*' stderr 'msg="Sending a request to BitBucket" method=PUT' diff --git a/cmd/pint/tests/0069_bitbucket_unmodified.txt b/cmd/pint/tests/0069_bitbucket_unmodified.txt index a30d4ba6..be6fb293 100644 --- a/cmd/pint/tests/0069_bitbucket_unmodified.txt +++ b/cmd/pint/tests/0069_bitbucket_unmodified.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.error -l error --no-color ci +! exec pint -l error --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0070_bitbucket_strict.txt b/cmd/pint/tests/0070_bitbucket_strict.txt index bf5656a5..773f71bb 100644 --- a/cmd/pint/tests/0070_bitbucket_strict.txt +++ b/cmd/pint/tests/0070_bitbucket_strict.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.error -l debug --no-color ci +! exec pint -l debug --no-color ci ! stdout . stderr 'result":"FAIL"' stderr ',"line":3}' diff --git a/cmd/pint/tests/0071_ci_owner.txt b/cmd/pint/tests/0071_ci_owner.txt index c32f26dd..1353807f 100644 --- a/cmd/pint/tests/0071_ci_owner.txt +++ b/cmd/pint/tests/0071_ci_owner.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.error -l error --no-color ci --require-owner +! exec pint -l error --no-color ci --require-owner ! stdout . cd .. cmp stderr stderr.txt diff --git a/cmd/pint/tests/0072_bitbucket_move_bug_to_modified.txt b/cmd/pint/tests/0072_bitbucket_move_bug_to_modified.txt index 9d6563d6..2452cae2 100644 --- a/cmd/pint/tests/0072_bitbucket_move_bug_to_modified.txt +++ b/cmd/pint/tests/0072_bitbucket_move_bug_to_modified.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.error --no-color -l debug ci +! exec pint --no-color -l debug ci ! stdout . stderr 'level=INFO msg="Problems found" Fatal=1' stderr 'result":"FAIL"' diff --git a/cmd/pint/tests/0073_lint_k8s.txt b/cmd/pint/tests/0073_lint_k8s.txt index 6cb2cf6f..a7adb1d0 100644 --- a/cmd/pint/tests/0073_lint_k8s.txt +++ b/cmd/pint/tests/0073_lint_k8s.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0074_strict_error.txt b/cmd/pint/tests/0074_strict_error.txt index e2465cf0..7ce9a916 100644 --- a/cmd/pint/tests/0074_strict_error.txt +++ b/cmd/pint/tests/0074_strict_error.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0075_ci_strict.txt b/cmd/pint/tests/0075_ci_strict.txt index 5ee57a78..5b6a4f35 100644 --- a/cmd/pint/tests/0075_ci_strict.txt +++ b/cmd/pint/tests/0075_ci_strict.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.error -l debug --no-color ci --require-owner +! exec pint -l debug --no-color ci --require-owner ! stdout . stderr 'msg="Sending a request to BitBucket" method=PUT' stderr 'msg="BitBucket request completed" status=200' diff --git a/cmd/pint/tests/0076_ci_group_errors.txt b/cmd/pint/tests/0076_ci_group_errors.txt index 7c172844..6a6cac67 100644 --- a/cmd/pint/tests/0076_ci_group_errors.txt +++ b/cmd/pint/tests/0076_ci_group_errors.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.error -l warn --no-color ci --require-owner +! exec pint -l warn --no-color ci --require-owner ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0077_strict_error_owner.txt b/cmd/pint/tests/0077_strict_error_owner.txt index ab92d5a2..d367043a 100644 --- a/cmd/pint/tests/0077_strict_error_owner.txt +++ b/cmd/pint/tests/0077_strict_error_owner.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint --require-owner rules +! exec pint --no-color lint --require-owner rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0078_repeated_group.txt b/cmd/pint/tests/0078_repeated_group.txt index 7525cd84..e20a82a9 100644 --- a/cmd/pint/tests/0078_repeated_group.txt +++ b/cmd/pint/tests/0078_repeated_group.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint --require-owner rules +! exec pint --no-color lint --require-owner rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0079_check_promql_series_invalid.txt b/cmd/pint/tests/0079_check_promql_series_invalid.txt index 6e06b66d..76f2645b 100644 --- a/cmd/pint/tests/0079_check_promql_series_invalid.txt +++ b/cmd/pint/tests/0079_check_promql_series_invalid.txt @@ -1,4 +1,4 @@ -pint.error --no-color config +! exec pint --no-color config ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0080_lint_online.txt b/cmd/pint/tests/0080_lint_online.txt index 75198518..c26d60e3 100644 --- a/cmd/pint/tests/0080_lint_online.txt +++ b/cmd/pint/tests/0080_lint_online.txt @@ -5,7 +5,7 @@ http response prometheus /api/v1/query_range 200 {"status":"success","data":{"re http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[]}} http start prometheus 127.0.0.1:7080 -pint.ok --no-color lint rules +exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0081_rulefmt.txt b/cmd/pint/tests/0081_rulefmt.txt index 6e581d3c..d6cfa467 100644 --- a/cmd/pint/tests/0081_rulefmt.txt +++ b/cmd/pint/tests/0081_rulefmt.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0082_ci_base_branch_flag.txt b/cmd/pint/tests/0082_ci_base_branch_flag.txt index ab209a93..d04b8eb1 100644 --- a/cmd/pint/tests/0082_ci_base_branch_flag.txt +++ b/cmd/pint/tests/0082_ci_base_branch_flag.txt @@ -11,7 +11,7 @@ env GIT_COMMITTER_EMAIL=pint@example.com exec git add . exec git commit -am 'import rules and config' -pint.ok --no-color ci --base-branch=main +exec pint --no-color ci --base-branch=main ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0083_github_action.txt b/cmd/pint/tests/0083_github_action.txt index a55d9a09..6033db1b 100644 --- a/cmd/pint/tests/0083_github_action.txt +++ b/cmd/pint/tests/0083_github_action.txt @@ -29,7 +29,7 @@ env GITHUB_REF=refs/pull/123/merge env GITHUB_BASE_REF=main env GITHUB_REPOSITORY=foo/bar env GITHUB_API_URL=http://127.0.0.1:6083 -pint.ok -l debug --offline --no-color ci +exec pint -l debug --offline --no-color ci ! stdout . stderr 'level=INFO msg="Pull request review created" status="200 OK"' stderr 'level=INFO msg="Setting GITHUB_PULL_REQUEST_NUMBER from GITHUB_REF env variable" pr=123' diff --git a/cmd/pint/tests/0084_github_action_override.txt b/cmd/pint/tests/0084_github_action_override.txt index 2a92e090..61bdd158 100644 --- a/cmd/pint/tests/0084_github_action_override.txt +++ b/cmd/pint/tests/0084_github_action_override.txt @@ -29,7 +29,7 @@ env GITHUB_REF=refs/pull/123/merge env GITHUB_BASE_REF=main env GITHUB_REPOSITORY=foo/bar env GITHUB_API_URL=http://127.0.0.1:6084 -pint.ok -l debug --offline --no-color ci +exec pint -l debug --offline --no-color ci ! stdout . stderr 'level=INFO msg="Pull request review created" status="200 OK"' stderr 'level=INFO msg="Setting GITHUB_PULL_REQUEST_NUMBER from GITHUB_REF env variable" pr=123' diff --git a/cmd/pint/tests/0085_github_no_envs.txt b/cmd/pint/tests/0085_github_no_envs.txt index fcb1f66e..c793850d 100644 --- a/cmd/pint/tests/0085_github_no_envs.txt +++ b/cmd/pint/tests/0085_github_no_envs.txt @@ -25,7 +25,7 @@ exec git commit -am 'v2' env GITHUB_AUTH_TOKEN=12345 env GITHUB_ACTION=YES env GITHUB_PULL_REQUEST_NUMBER=123 -pint.ok -l debug --offline --no-color ci +exec pint -l debug --offline --no-color ci ! stdout . stderr 'level=INFO msg="Pull request review created" status="200 OK"' diff --git a/cmd/pint/tests/0086_rulefmt_ignored_errors.txt b/cmd/pint/tests/0086_rulefmt_ignored_errors.txt index 4a1d2efd..80bf319a 100644 --- a/cmd/pint/tests/0086_rulefmt_ignored_errors.txt +++ b/cmd/pint/tests/0086_rulefmt_ignored_errors.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0087_dedup.txt b/cmd/pint/tests/0087_dedup.txt index 14ec6306..f4e170f9 100644 --- a/cmd/pint/tests/0087_dedup.txt +++ b/cmd/pint/tests/0087_dedup.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0088_rule_link.txt b/cmd/pint/tests/0088_rule_link.txt index 1ef5b3f5..371f9e09 100644 --- a/cmd/pint/tests/0088_rule_link.txt +++ b/cmd/pint/tests/0088_rule_link.txt @@ -5,7 +5,7 @@ http redirect mock /redirect/200 /200 http redirect mock /redirect/404 /404 http start mock 127.0.0.1:7088 -pint.ok --no-color lint --min-severity=info rules +exec pint --no-color lint --min-severity=info rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0089_lint_min_severity_bug.txt b/cmd/pint/tests/0089_lint_min_severity_bug.txt index c851e0b4..3c875acc 100644 --- a/cmd/pint/tests/0089_lint_min_severity_bug.txt +++ b/cmd/pint/tests/0089_lint_min_severity_bug.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint --min-severity=bug rules +exec pint --no-color lint --min-severity=bug rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0090_lint_min_severity_info.txt b/cmd/pint/tests/0090_lint_min_severity_info.txt index 0157e3bc..e6e75940 100644 --- a/cmd/pint/tests/0090_lint_min_severity_info.txt +++ b/cmd/pint/tests/0090_lint_min_severity_info.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint --min-severity=info rules +exec pint --no-color lint --min-severity=info rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0091_lint_min_severity_invalid.txt b/cmd/pint/tests/0091_lint_min_severity_invalid.txt index 1f06d8e6..ccf0d13b 100644 --- a/cmd/pint/tests/0091_lint_min_severity_invalid.txt +++ b/cmd/pint/tests/0091_lint_min_severity_invalid.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint --min-severity=xxx rules +! exec pint --no-color lint --min-severity=xxx rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0092_dir_symlink.txt b/cmd/pint/tests/0092_dir_symlink.txt index 950f8fb4..7b5dbb7d 100644 --- a/cmd/pint/tests/0092_dir_symlink.txt +++ b/cmd/pint/tests/0092_dir_symlink.txt @@ -3,7 +3,7 @@ mkdir rules/src exec ln -s src rules/dst exec ln -s rules linked -pint.ok -l debug --no-color lint rules linked rules/src/rule.yaml +exec pint -l debug --no-color lint rules linked rules/src/rule.yaml ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0093_ci_bitbucket_ignore_file.txt b/cmd/pint/tests/0093_ci_bitbucket_ignore_file.txt index f60fdb8b..83814cba 100644 --- a/cmd/pint/tests/0093_ci_bitbucket_ignore_file.txt +++ b/cmd/pint/tests/0093_ci_bitbucket_ignore_file.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.ok --no-color -l debug ci +exec pint --no-color -l debug ci ! stdout . stderr 'level=INFO msg="Problems found" Information=1' stderr 'result":"PASS"' diff --git a/cmd/pint/tests/0094_rule_file_symlink_bb.txt b/cmd/pint/tests/0094_rule_file_symlink_bb.txt index 813f5239..3f6a3aed 100644 --- a/cmd/pint/tests/0094_rule_file_symlink_bb.txt +++ b/cmd/pint/tests/0094_rule_file_symlink_bb.txt @@ -37,7 +37,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.error -l debug -d promql/series --no-color ci +! exec pint -l debug -d promql/series --no-color ci ! stdout . stderr 'path=rules.yml rule=rule1' diff --git a/cmd/pint/tests/0095_rulefmt_symlink.txt b/cmd/pint/tests/0095_rulefmt_symlink.txt index 37cbcef1..f5e52410 100644 --- a/cmd/pint/tests/0095_rulefmt_symlink.txt +++ b/cmd/pint/tests/0095_rulefmt_symlink.txt @@ -1,7 +1,7 @@ mkdir rules/strict exec ln -s ../relaxed/1.yml rules/strict/symlink.yml -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0096_bad_symlink.txt b/cmd/pint/tests/0096_bad_symlink.txt index b836a354..4fd6e570 100644 --- a/cmd/pint/tests/0096_bad_symlink.txt +++ b/cmd/pint/tests/0096_bad_symlink.txt @@ -1,7 +1,7 @@ mkdir rules exec ln -s ../bad.yml rules/symlink.yml -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0097_rule_file_symlink_error.txt b/cmd/pint/tests/0097_rule_file_symlink_error.txt index 9a8d96a5..966207dd 100644 --- a/cmd/pint/tests/0097_rule_file_symlink_error.txt +++ b/cmd/pint/tests/0097_rule_file_symlink_error.txt @@ -16,7 +16,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error -l debug -d promql/series --no-color ci +! exec pint -l debug -d promql/series --no-color ci ! stdout . stderr 'level=ERROR msg="Fatal error" err="symlink.yml is a symlink but target file cannot be evaluated: lstat xxx.yml: no such file or directory"' diff --git a/cmd/pint/tests/0098_rule_file_symlink_gh.txt b/cmd/pint/tests/0098_rule_file_symlink_gh.txt index e17d9c8e..1b7ed479 100644 --- a/cmd/pint/tests/0098_rule_file_symlink_gh.txt +++ b/cmd/pint/tests/0098_rule_file_symlink_gh.txt @@ -25,7 +25,7 @@ exec git commit -am 'v2' env GITHUB_AUTH_TOKEN=12345 env GITHUB_PULL_REQUEST_NUMBER=1 -pint.ok -l debug -d promql/series --no-color ci +exec pint -l debug -d promql/series --no-color ci ! stdout . stderr 'level=INFO msg="Pull request review created" status="200 OK"' diff --git a/cmd/pint/tests/0099_symlink_outside_glob.txt b/cmd/pint/tests/0099_symlink_outside_glob.txt index 53f4124f..a48dfdcb 100644 --- a/cmd/pint/tests/0099_symlink_outside_glob.txt +++ b/cmd/pint/tests/0099_symlink_outside_glob.txt @@ -1,7 +1,7 @@ mkdir rules/strict exec ln -s ../relaxed/1.yml rules/strict/symlink.yml -pint.ok -l debug --no-color lint rules/relaxed +exec pint -l debug --no-color lint rules/relaxed ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0100_ci_alerts_count.txt b/cmd/pint/tests/0100_ci_alerts_count.txt index 257e4b85..5a1b5228 100644 --- a/cmd/pint/tests/0100_ci_alerts_count.txt +++ b/cmd/pint/tests/0100_ci_alerts_count.txt @@ -27,7 +27,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.ok -l debug --no-color ci +exec pint -l debug --no-color ci ! stdout . stderr '{"path":"rules.yml","message":"alerts/count:.*,"line":4}' stderr '{"path":"rules.yml","message":"alerts/count:.*,"line":11}' diff --git a/cmd/pint/tests/0101_prometheus_basic_auth.txt b/cmd/pint/tests/0101_prometheus_basic_auth.txt index 0ce7e350..22c4e3a3 100644 --- a/cmd/pint/tests/0101_prometheus_basic_auth.txt +++ b/cmd/pint/tests/0101_prometheus_basic_auth.txt @@ -5,7 +5,7 @@ http auth-response prometheus /api/v1/query_range admin pass 200 {"status":"succ http auth-response prometheus /api/v1/query admin pass 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1666873962.795,"1"]}]}} http start prometheus 127.0.0.1:7101 -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . ! stderr 'admin:pass' -- rules/1.yml -- diff --git a/cmd/pint/tests/0102_prometheus_basic_auth_empty.txt b/cmd/pint/tests/0102_prometheus_basic_auth_empty.txt index 684d5c46..b1b8b2c4 100644 --- a/cmd/pint/tests/0102_prometheus_basic_auth_empty.txt +++ b/cmd/pint/tests/0102_prometheus_basic_auth_empty.txt @@ -4,7 +4,7 @@ http auth-response prometheus /api/v1/query_range admin pass 200 {"status":"succ http auth-response prometheus /api/v1/query admin pass 200 {"status":"success","data":{"resultType":"vector","result":[]}} http start prometheus 127.0.0.1:7102 -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . ! stderr 'admin:pass' -- rules/1.yml -- diff --git a/cmd/pint/tests/0103_file_disable.txt b/cmd/pint/tests/0103_file_disable.txt index 31a37d72..d0b5ee18 100644 --- a/cmd/pint/tests/0103_file_disable.txt +++ b/cmd/pint/tests/0103_file_disable.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0104_file_ignore_prom.txt b/cmd/pint/tests/0104_file_ignore_prom.txt index 04fc18ac..5c3898d4 100644 --- a/cmd/pint/tests/0104_file_ignore_prom.txt +++ b/cmd/pint/tests/0104_file_ignore_prom.txt @@ -2,7 +2,7 @@ http response prometheus /api/v1/metadata 200 {"status":"success","data":{}} http response prometheus / 502 Bad Gateway http start prometheus 127.0.0.1:7104 -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . stderr 'level=ERROR msg="Query returned an error" err="server error: 502" uri=http://127.0.0.1:7104 query=/api/v1/status/config' stderr 'level=ERROR msg="Query returned an error" err="server error: 502" uri=http://127.0.0.1:7104 query=/api/v1/status/flags' diff --git a/cmd/pint/tests/0105_too_many_samples.txt b/cmd/pint/tests/0105_too_many_samples.txt index 583723d8..757b8400 100644 --- a/cmd/pint/tests/0105_too_many_samples.txt +++ b/cmd/pint/tests/0105_too_many_samples.txt @@ -5,7 +5,7 @@ http response prometheus /api/v1/query_range 400 {"status":"error","errorType":" http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[]}} http start prometheus 127.0.0.1:7105 -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . stderr 'level=ERROR msg="Query returned an error" err="query processing would load too many samples into memory in query execution" uri=http://127.0.0.1:7105 query=count\(up\)' stderr 'level=WARN msg="Cannot detect Prometheus uptime gaps" err="execution: query processing would load too many samples into memory in query execution" name=prom' diff --git a/cmd/pint/tests/0106_ci_git_branch_error.txt b/cmd/pint/tests/0106_ci_git_branch_error.txt index aad0798b..95cf83fb 100644 --- a/cmd/pint/tests/0106_ci_git_branch_error.txt +++ b/cmd/pint/tests/0106_ci_git_branch_error.txt @@ -1,4 +1,4 @@ -pint.error -l debug --no-color ci +! exec pint -l debug --no-color ci ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0107_ci_git_invalid_log_level.txt b/cmd/pint/tests/0107_ci_git_invalid_log_level.txt index c3fd751a..f4389eb7 100644 --- a/cmd/pint/tests/0107_ci_git_invalid_log_level.txt +++ b/cmd/pint/tests/0107_ci_git_invalid_log_level.txt @@ -1,3 +1,3 @@ -pint.error -l xxx --no-color ci +! exec pint -l xxx --no-color ci ! stdout . stderr 'ERROR Fatal error err="failed to set log level: ''xxx'' is not a valid log level"' diff --git a/cmd/pint/tests/0108_rule_duplicate.txt b/cmd/pint/tests/0108_rule_duplicate.txt index 46c36890..480d6997 100644 --- a/cmd/pint/tests/0108_rule_duplicate.txt +++ b/cmd/pint/tests/0108_rule_duplicate.txt @@ -1,4 +1,4 @@ -pint.error --no-color -d 'promql/.*' -d alerts/count lint rules +! exec pint --no-color -d 'promql/.*' -d alerts/count lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0109_rule_duplicate_multiple_proms_include.txt b/cmd/pint/tests/0109_rule_duplicate_multiple_proms_include.txt index e2ed90ef..887eca75 100644 --- a/cmd/pint/tests/0109_rule_duplicate_multiple_proms_include.txt +++ b/cmd/pint/tests/0109_rule_duplicate_multiple_proms_include.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -d 'promql/.*' -d alerts/count -d labels/conflict lint rules +exec pint --no-color -d 'promql/.*' -d alerts/count -d labels/conflict lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0110_rule_duplicate_multiple_proms_exclude.txt b/cmd/pint/tests/0110_rule_duplicate_multiple_proms_exclude.txt index 07dff1e9..037edbb2 100644 --- a/cmd/pint/tests/0110_rule_duplicate_multiple_proms_exclude.txt +++ b/cmd/pint/tests/0110_rule_duplicate_multiple_proms_exclude.txt @@ -1,4 +1,4 @@ -pint.ok --no-color -d 'promql/.*' -d alerts/count lint rules +exec pint --no-color -d 'promql/.*' -d alerts/count lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0111_snooze.txt b/cmd/pint/tests/0111_snooze.txt index 3002dcaf..f3267764 100644 --- a/cmd/pint/tests/0111_snooze.txt +++ b/cmd/pint/tests/0111_snooze.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0112_expired_snooze.txt b/cmd/pint/tests/0112_expired_snooze.txt index fe3071a6..52f852e0 100644 --- a/cmd/pint/tests/0112_expired_snooze.txt +++ b/cmd/pint/tests/0112_expired_snooze.txt @@ -1,4 +1,4 @@ -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0113_config_env_expand.txt b/cmd/pint/tests/0113_config_env_expand.txt index a33214b4..6e0a01fe 100644 --- a/cmd/pint/tests/0113_config_env_expand.txt +++ b/cmd/pint/tests/0113_config_env_expand.txt @@ -1,7 +1,7 @@ env FOO=BAR env AUTH_KEY=1234 env FAKE_ENV=KEY=VAL -pint.ok --no-color config +exec pint --no-color config ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0114_config_env_expand_error.txt b/cmd/pint/tests/0114_config_env_expand_error.txt index 7752091d..f7a00182 100644 --- a/cmd/pint/tests/0114_config_env_expand_error.txt +++ b/cmd/pint/tests/0114_config_env_expand_error.txt @@ -1,5 +1,5 @@ env FOO=BAR -pint.error --no-color config +! exec pint --no-color config ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0115_file_disable_tag.txt b/cmd/pint/tests/0115_file_disable_tag.txt index 4539e095..800475eb 100644 --- a/cmd/pint/tests/0115_file_disable_tag.txt +++ b/cmd/pint/tests/0115_file_disable_tag.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0116_file_snooze.txt b/cmd/pint/tests/0116_file_snooze.txt index 96878964..ca718290 100644 --- a/cmd/pint/tests/0116_file_snooze.txt +++ b/cmd/pint/tests/0116_file_snooze.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint --min-severity=info rules +exec pint -l debug --no-color lint --min-severity=info rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0118_ci_dir_move.txt b/cmd/pint/tests/0118_ci_dir_move.txt index 0c7638f1..ec82820a 100644 --- a/cmd/pint/tests/0118_ci_dir_move.txt +++ b/cmd/pint/tests/0118_ci_dir_move.txt @@ -26,7 +26,7 @@ exec git commit -am 'v2' env GITHUB_AUTH_TOKEN=12345 env GITHUB_PULL_REQUEST_NUMBER=1 -pint.ok -l debug --no-color ci +exec pint -l debug --no-color ci ! stdout . stderr 'level=INFO msg="Pull request review created" status="200 OK"' stderr 'msg="Skipping directory entry change"' diff --git a/cmd/pint/tests/0119_ci_fail_on_warning.txt b/cmd/pint/tests/0119_ci_fail_on_warning.txt index 7de0dd98..61e4be24 100644 --- a/cmd/pint/tests/0119_ci_fail_on_warning.txt +++ b/cmd/pint/tests/0119_ci_fail_on_warning.txt @@ -24,7 +24,7 @@ exec git commit -am 'v2' env GITHUB_AUTH_TOKEN=12345 env GITHUB_PULL_REQUEST_NUMBER=1 -pint.error -l debug --offline --no-color ci --fail-on=warning +! exec pint -l debug --offline --no-color ci --fail-on=warning ! stdout . stderr 'level=INFO msg="Pull request review created" status="200 OK"' diff --git a/cmd/pint/tests/0120_ci_fail_on_invalid.txt b/cmd/pint/tests/0120_ci_fail_on_invalid.txt index 25dade91..286a8aef 100644 --- a/cmd/pint/tests/0120_ci_fail_on_invalid.txt +++ b/cmd/pint/tests/0120_ci_fail_on_invalid.txt @@ -17,7 +17,7 @@ exec git commit -am 'v2' env GITHUB_AUTH_TOKEN=12345 env GITHUB_PULL_REQUEST_NUMBER=1 -pint.error -l debug --offline --no-color ci --fail-on=bogus +! exec pint -l debug --offline --no-color ci --fail-on=bogus ! stdout . stderr 'level=ERROR msg="Fatal error" err="invalid --fail-on value: unknown severity: bogus"' diff --git a/cmd/pint/tests/0121_rule_for.txt b/cmd/pint/tests/0121_rule_for.txt index 96b4b529..33cde564 100644 --- a/cmd/pint/tests/0121_rule_for.txt +++ b/cmd/pint/tests/0121_rule_for.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0122_lint_owner_allowed.txt b/cmd/pint/tests/0122_lint_owner_allowed.txt index be82c42c..f0493539 100644 --- a/cmd/pint/tests/0122_lint_owner_allowed.txt +++ b/cmd/pint/tests/0122_lint_owner_allowed.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint --require-owner rules +! exec pint --no-color lint --require-owner rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0123_ci_owner_allowed.txt b/cmd/pint/tests/0123_ci_owner_allowed.txt index 6b5256a1..07503a22 100644 --- a/cmd/pint/tests/0123_ci_owner_allowed.txt +++ b/cmd/pint/tests/0123_ci_owner_allowed.txt @@ -20,7 +20,7 @@ cp ../src/v2.yml rules.yml exec git commit -am 'v2' env BITBUCKET_AUTH_TOKEN="12345" -pint.error -l error --no-color ci --require-owner +! exec pint -l error --no-color ci --require-owner ! stdout . cd .. cmp stderr stderr.txt diff --git a/cmd/pint/tests/0124_ci_base_branch_flag.txt b/cmd/pint/tests/0124_ci_base_branch_flag.txt index 6be4361b..c64702e3 100644 --- a/cmd/pint/tests/0124_ci_base_branch_flag.txt +++ b/cmd/pint/tests/0124_ci_base_branch_flag.txt @@ -15,7 +15,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error --no-color ci --base-branch=main +! exec pint --no-color ci --base-branch=main ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0125_lint_fail_on_warning.txt b/cmd/pint/tests/0125_lint_fail_on_warning.txt index a6458d30..bba2cbfe 100644 --- a/cmd/pint/tests/0125_lint_fail_on_warning.txt +++ b/cmd/pint/tests/0125_lint_fail_on_warning.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint --fail-on=warning rules +! exec pint --no-color lint --fail-on=warning rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0126_lint_fail_on_invalid.txt b/cmd/pint/tests/0126_lint_fail_on_invalid.txt index e483f161..eca135fb 100644 --- a/cmd/pint/tests/0126_lint_fail_on_invalid.txt +++ b/cmd/pint/tests/0126_lint_fail_on_invalid.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint --fail-on=xxx rules +! exec pint --no-color lint --fail-on=xxx rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0127_lint_fail_on_fatal_but_got_warning.txt b/cmd/pint/tests/0127_lint_fail_on_fatal_but_got_warning.txt index cd4942a4..be5b57ce 100644 --- a/cmd/pint/tests/0127_lint_fail_on_fatal_but_got_warning.txt +++ b/cmd/pint/tests/0127_lint_fail_on_fatal_but_got_warning.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint --fail-on=fatal --min-severity=bug rules +exec pint --no-color lint --fail-on=fatal --min-severity=bug rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0128_lint_fail_on_warning_only.txt b/cmd/pint/tests/0128_lint_fail_on_warning_only.txt index 1b7c1346..e26106dd 100644 --- a/cmd/pint/tests/0128_lint_fail_on_warning_only.txt +++ b/cmd/pint/tests/0128_lint_fail_on_warning_only.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint --fail-on=warning --min-severity=bug rules +! exec pint --no-color lint --fail-on=warning --min-severity=bug rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0129_tls_cacert_bad.txt b/cmd/pint/tests/0129_tls_cacert_bad.txt index 1ef81fe4..e7ddf064 100644 --- a/cmd/pint/tests/0129_tls_cacert_bad.txt +++ b/cmd/pint/tests/0129_tls_cacert_bad.txt @@ -5,7 +5,7 @@ http response prometheus /api/v1/query_range 200 {"status":"success","data":{"re http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1666873962.795,"1"]}]}} http start prometheus 127.0.0.1:7129 $WORK/prom.pem $WORK/prom.key -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . stderr 'tls: failed to verify certificate: x509: certificate signed by unknown authority' diff --git a/cmd/pint/tests/0130_tls_ca_good.txt b/cmd/pint/tests/0130_tls_ca_good.txt index 6fdf9bfd..bf9f0ca0 100644 --- a/cmd/pint/tests/0130_tls_ca_good.txt +++ b/cmd/pint/tests/0130_tls_ca_good.txt @@ -6,7 +6,7 @@ http response prometheus /api/v1/query_range 200 {"status":"success","data":{"re http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1666873962.795,"1"]}]}} http start prometheus 127.0.0.1:7130 $WORK/prom.pem $WORK/prom.key -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . ! stderr 'tls: failed to verify certificate: x509: certificate signed by unknown authority' diff --git a/cmd/pint/tests/0131_tls_cacert_bad_skipVerify.txt b/cmd/pint/tests/0131_tls_cacert_bad_skipVerify.txt index ab9716c2..00929475 100644 --- a/cmd/pint/tests/0131_tls_cacert_bad_skipVerify.txt +++ b/cmd/pint/tests/0131_tls_cacert_bad_skipVerify.txt @@ -6,7 +6,7 @@ http response prometheus /api/v1/query_range 200 {"status":"success","data":{"re http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1666873962.795,"1"]}]}} http start prometheus 127.0.0.1:7131 $WORK/prom.pem $WORK/prom.key -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . ! stderr 'tls: failed to verify certificate: x509: certificate signed by unknown authority' diff --git a/cmd/pint/tests/0132_tls_certs.txt b/cmd/pint/tests/0132_tls_certs.txt index a372b76a..d779878b 100644 --- a/cmd/pint/tests/0132_tls_certs.txt +++ b/cmd/pint/tests/0132_tls_certs.txt @@ -6,7 +6,7 @@ http response prometheus /api/v1/query_range 200 {"status":"success","data":{"re http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1666873962.795,"1"]}]}} http start prometheus 127.0.0.1:7132 $WORK/prom.pem $WORK/prom.key -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . ! stderr 'tls: failed to verify certificate: x509: certificate signed by unknown authority' diff --git a/cmd/pint/tests/0133_tls_certs_bad.txt b/cmd/pint/tests/0133_tls_certs_bad.txt index c2168d66..d55153fa 100644 --- a/cmd/pint/tests/0133_tls_certs_bad.txt +++ b/cmd/pint/tests/0133_tls_certs_bad.txt @@ -1,4 +1,4 @@ -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0134_ci_base_branch_flag_path.txt b/cmd/pint/tests/0134_ci_base_branch_flag_path.txt index 530728ad..77404dce 100644 --- a/cmd/pint/tests/0134_ci_base_branch_flag_path.txt +++ b/cmd/pint/tests/0134_ci_base_branch_flag_path.txt @@ -15,7 +15,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error -l debug --no-color ci --base-branch=origin/main +! exec pint -l debug --no-color ci --base-branch=origin/main ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0135_ci_base_branch_config_path.txt b/cmd/pint/tests/0135_ci_base_branch_config_path.txt index 87395209..5b17b524 100644 --- a/cmd/pint/tests/0135_ci_base_branch_config_path.txt +++ b/cmd/pint/tests/0135_ci_base_branch_config_path.txt @@ -15,7 +15,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error -l debug --no-color ci +! exec pint -l debug --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0136_annotation_regex_key.txt b/cmd/pint/tests/0136_annotation_regex_key.txt index ad98d246..c7d52db8 100644 --- a/cmd/pint/tests/0136_annotation_regex_key.txt +++ b/cmd/pint/tests/0136_annotation_regex_key.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint rules +exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0137_annotation_regex_key_fail.txt b/cmd/pint/tests/0137_annotation_regex_key_fail.txt index f880d3a8..2a2e27c1 100644 --- a/cmd/pint/tests/0137_annotation_regex_key_fail.txt +++ b/cmd/pint/tests/0137_annotation_regex_key_fail.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0138_annoation_regex_key_required.txt b/cmd/pint/tests/0138_annoation_regex_key_required.txt index 2ce32cfc..bfaddd99 100644 --- a/cmd/pint/tests/0138_annoation_regex_key_required.txt +++ b/cmd/pint/tests/0138_annoation_regex_key_required.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0139_ci_exclude.txt b/cmd/pint/tests/0139_ci_exclude.txt index 9a6652db..65c25259 100644 --- a/cmd/pint/tests/0139_ci_exclude.txt +++ b/cmd/pint/tests/0139_ci_exclude.txt @@ -20,7 +20,7 @@ cp ../src/b.yml b.yml exec git add b.yml exec git commit -am 'v2' -pint.ok -l debug --no-color ci +exec pint -l debug --no-color ci ! stdout . stderr 'level=DEBUG msg="Got branch information" base=main current=v2' stderr 'level=DEBUG msg="Git file change" change=A path=a.yml commit=.*' diff --git a/cmd/pint/tests/0140_ci_include_exclude.txt b/cmd/pint/tests/0140_ci_include_exclude.txt index a6c96f9b..c7392b9c 100644 --- a/cmd/pint/tests/0140_ci_include_exclude.txt +++ b/cmd/pint/tests/0140_ci_include_exclude.txt @@ -20,7 +20,7 @@ cp ../src/b.yml b.yml exec git add b.yml exec git commit -am 'v2' -pint.ok -l debug --no-color ci +exec pint -l debug --no-color ci ! stdout . stderr 'level=DEBUG msg="Got branch information" base=main current=v2' stderr 'level=DEBUG msg="Git file change" change=A path=a.yml commit=.*' diff --git a/cmd/pint/tests/0141_empty_keys.txt b/cmd/pint/tests/0141_empty_keys.txt index fdeed374..a395f2c0 100644 --- a/cmd/pint/tests/0141_empty_keys.txt +++ b/cmd/pint/tests/0141_empty_keys.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules.yml +! exec pint --no-color lint rules.yml ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0142_keep_firing_for.txt b/cmd/pint/tests/0142_keep_firing_for.txt index e6b4bd8b..c09b5d77 100644 --- a/cmd/pint/tests/0142_keep_firing_for.txt +++ b/cmd/pint/tests/0142_keep_firing_for.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint rules +exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0143_keep_firing_for.txt b/cmd/pint/tests/0143_keep_firing_for.txt index 14c2cea6..30f0a456 100644 --- a/cmd/pint/tests/0143_keep_firing_for.txt +++ b/cmd/pint/tests/0143_keep_firing_for.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0144_discovery_filepath.txt b/cmd/pint/tests/0144_discovery_filepath.txt index 6372d00a..48f0627c 100644 --- a/cmd/pint/tests/0144_discovery_filepath.txt +++ b/cmd/pint/tests/0144_discovery_filepath.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0145_discovery_filepath_dup.txt b/cmd/pint/tests/0145_discovery_filepath_dup.txt index 058087d0..7db5db38 100644 --- a/cmd/pint/tests/0145_discovery_filepath_dup.txt +++ b/cmd/pint/tests/0145_discovery_filepath_dup.txt @@ -1,4 +1,4 @@ -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0146_discovery_filepath_bad_template.txt b/cmd/pint/tests/0146_discovery_filepath_bad_template.txt index d5693ff6..25dba645 100644 --- a/cmd/pint/tests/0146_discovery_filepath_bad_template.txt +++ b/cmd/pint/tests/0146_discovery_filepath_bad_template.txt @@ -1,4 +1,4 @@ -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0147_discovery_filepath_error.txt b/cmd/pint/tests/0147_discovery_filepath_error.txt index 789e9165..a12b0604 100644 --- a/cmd/pint/tests/0147_discovery_filepath_error.txt +++ b/cmd/pint/tests/0147_discovery_filepath_error.txt @@ -1,4 +1,4 @@ -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0148_discovery_prom_zero.txt b/cmd/pint/tests/0148_discovery_prom_zero.txt index 4b2df58b..14c36eb2 100644 --- a/cmd/pint/tests/0148_discovery_prom_zero.txt +++ b/cmd/pint/tests/0148_discovery_prom_zero.txt @@ -1,7 +1,7 @@ http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[]}} http start prometheus 127.0.0.1:7148 -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0149_discovery_prom.txt b/cmd/pint/tests/0149_discovery_prom.txt index d9e07eaa..f6ca1ffc 100644 --- a/cmd/pint/tests/0149_discovery_prom.txt +++ b/cmd/pint/tests/0149_discovery_prom.txt @@ -1,7 +1,7 @@ http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{"instance":"prom1"},"value":[1698249632.491,"1"]},{"metric":{"instance":"prom2"},"value":[1698249632.491,"1"]}]}} http start prometheus 127.0.0.1:7149 -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0150_discovery_prom_dup_tags.txt b/cmd/pint/tests/0150_discovery_prom_dup_tags.txt index 8880dc0b..c91b8a0b 100644 --- a/cmd/pint/tests/0150_discovery_prom_dup_tags.txt +++ b/cmd/pint/tests/0150_discovery_prom_dup_tags.txt @@ -1,7 +1,7 @@ http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{"name":"prom1"},"value":[1698249632.491,"1"]},{"metric":{"name":"prom2"},"value":[1698249632.491,"1"]}]}} http start prometheus 127.0.0.1:7150 -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0151_discovery_prom_error.txt b/cmd/pint/tests/0151_discovery_prom_error.txt index a32b6c24..bc245f64 100644 --- a/cmd/pint/tests/0151_discovery_prom_error.txt +++ b/cmd/pint/tests/0151_discovery_prom_error.txt @@ -1,7 +1,7 @@ http response prometheus /api/v1/query 500 {"status":"error","errorType":"bad_data","error":"bogus query"} http start prometheus 127.0.0.1:7151 -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0152_discovery_prom_dup_uptime.txt b/cmd/pint/tests/0152_discovery_prom_dup_uptime.txt index 9462e6c1..b5813fc2 100644 --- a/cmd/pint/tests/0152_discovery_prom_dup_uptime.txt +++ b/cmd/pint/tests/0152_discovery_prom_dup_uptime.txt @@ -1,7 +1,7 @@ http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{"name":"prom1"},"value":[1698249632.491,"1"]},{"metric":{"name":"prom2"},"value":[1698249632.491,"1"]}]}} http start prometheus 127.0.0.1:7152 -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0153_ci_bitbucket_missing_token.txt b/cmd/pint/tests/0153_ci_bitbucket_missing_token.txt index afbbbc30..e0377275 100644 --- a/cmd/pint/tests/0153_ci_bitbucket_missing_token.txt +++ b/cmd/pint/tests/0153_ci_bitbucket_missing_token.txt @@ -15,7 +15,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error --no-color -l debug ci +! exec pint --no-color -l debug ci ! stdout . stderr 'level=ERROR msg="Fatal error" err="BITBUCKET_AUTH_TOKEN env variable is required when reporting to BitBucket"' diff --git a/cmd/pint/tests/0154_ci_discovery_error.txt b/cmd/pint/tests/0154_ci_discovery_error.txt index 7e3c5729..7fa2e457 100644 --- a/cmd/pint/tests/0154_ci_discovery_error.txt +++ b/cmd/pint/tests/0154_ci_discovery_error.txt @@ -15,7 +15,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error --no-color -l debug ci +! exec pint --no-color -l debug ci ! stdout . stderr 'level=ERROR msg="Fatal error" err="filepath discovery error: lstat notfound: no such file or directory"' diff --git a/cmd/pint/tests/0155_discovery_prom_dup_include.txt b/cmd/pint/tests/0155_discovery_prom_dup_include.txt index 57be5dd4..ae787565 100644 --- a/cmd/pint/tests/0155_discovery_prom_dup_include.txt +++ b/cmd/pint/tests/0155_discovery_prom_dup_include.txt @@ -1,7 +1,7 @@ http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{"name":"prom1"},"value":[1698249632.491,"1"]},{"metric":{"name":"prom2"},"value":[1698249632.491,"1"]}]}} http start prometheus 127.0.0.1:7155 -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0156_discovery_prom_dup_exclude.txt b/cmd/pint/tests/0156_discovery_prom_dup_exclude.txt index 7f727439..e21eeaee 100644 --- a/cmd/pint/tests/0156_discovery_prom_dup_exclude.txt +++ b/cmd/pint/tests/0156_discovery_prom_dup_exclude.txt @@ -1,7 +1,7 @@ http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{"name":"prom1"},"value":[1698249632.491,"1"]},{"metric":{"name":"prom2"},"value":[1698249632.491,"1"]}]}} http start prometheus 127.0.0.1:7156 -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0157_series_other_servers.txt b/cmd/pint/tests/0157_series_other_servers.txt index d146f3e7..26be826e 100644 --- a/cmd/pint/tests/0157_series_other_servers.txt +++ b/cmd/pint/tests/0157_series_other_servers.txt @@ -8,7 +8,7 @@ http start prometheus1 127.0.0.1:7157 http response prometheus2 /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1698249632.491,"1"]}]}} http start prometheus2 127.0.0.1:8157 -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0158_lint_teamcity.txt b/cmd/pint/tests/0158_lint_teamcity.txt index 7fa7ea02..11763c00 100644 --- a/cmd/pint/tests/0158_lint_teamcity.txt +++ b/cmd/pint/tests/0158_lint_teamcity.txt @@ -1,5 +1,5 @@ env NO_COLOR=1 -pint.error --no-color lint --min-severity=info --teamcity rules +! exec pint --no-color lint --min-severity=info --teamcity rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0159_ci_teamcity.txt b/cmd/pint/tests/0159_ci_teamcity.txt index 520b88b0..7287f06a 100644 --- a/cmd/pint/tests/0159_ci_teamcity.txt +++ b/cmd/pint/tests/0159_ci_teamcity.txt @@ -22,7 +22,7 @@ exec git commit -am 'v2' exec git rm a.yml exec git commit -am 'v3' -pint.error --no-color ci -t +! exec pint --no-color ci -t ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0160_ci_comment_edit.txt b/cmd/pint/tests/0160_ci_comment_edit.txt index 4d41292b..ddfc3e94 100644 --- a/cmd/pint/tests/0160_ci_comment_edit.txt +++ b/cmd/pint/tests/0160_ci_comment_edit.txt @@ -21,7 +21,7 @@ exec git commit -am 'import rules and config' exec git checkout -b v1 cp ../src/v1.yml rules.yml exec git commit -am 'v1' -pint.ok --no-color ci +exec pint --no-color ci cmp stderr ../stderrV1.txt exec git checkout main @@ -30,7 +30,7 @@ exec git merge v1 exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.error --no-color ci +! exec pint --no-color ci ! stdout . cmp stderr ../stderrV2.txt diff --git a/cmd/pint/tests/0161_ci_move_files.txt b/cmd/pint/tests/0161_ci_move_files.txt index 1a26319c..9d3785f5 100644 --- a/cmd/pint/tests/0161_ci_move_files.txt +++ b/cmd/pint/tests/0161_ci_move_files.txt @@ -21,7 +21,7 @@ exec git commit -am 'import rules and config' exec git checkout -b v1 cp ../src/v1.yml prom1.yml exec git commit -am 'v1' -pint.ok --no-color ci +exec pint --no-color ci cmp stderr ../stderrV1.txt exec git checkout main @@ -30,7 +30,7 @@ exec git merge v1 exec git checkout -b v2 exec git mv prom1.yml prom2.yml exec git commit -am 'v2' -pint.error -l error --no-color ci +! exec pint -l error --no-color ci ! stdout . cmp stderr ../stderrV2.txt diff --git a/cmd/pint/tests/0162_ci_deleted_dependency.txt b/cmd/pint/tests/0162_ci_deleted_dependency.txt index ec962482..5930890a 100644 --- a/cmd/pint/tests/0162_ci_deleted_dependency.txt +++ b/cmd/pint/tests/0162_ci_deleted_dependency.txt @@ -17,7 +17,7 @@ exec git checkout -b v2 cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.ok -l error --offline --no-color ci +exec pint -l error --offline --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0163_ci_comment_resolve.txt b/cmd/pint/tests/0163_ci_comment_resolve.txt index 0edd6977..d86ce0f5 100644 --- a/cmd/pint/tests/0163_ci_comment_resolve.txt +++ b/cmd/pint/tests/0163_ci_comment_resolve.txt @@ -25,7 +25,7 @@ exec git commit -am 'import rules and config' exec git checkout -b modify cp ../src/v1.yml rules.yml exec git commit -am 'v1' -pint.error --no-color ci +! exec pint --no-color ci stderr 'msg="Problems found" Fatal=1' stderr 'msg="Sending a request to BitBucket" method=DELETE path=/rest/insights/1.0/projects/prometheus/repos/rules/commits/.*/reports/pint' stderr 'msg="Sending a request to BitBucket" method=PUT path=/rest/insights/1.0/projects/prometheus/repos/rules/commits/.*/reports/pint' @@ -43,7 +43,7 @@ stderr 'msg="Added pull request comments to BitBucket" count=1' cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.ok --no-color ci +exec pint --no-color ci ! stdout . ! stderr 'msg="Problems found"' stderr 'msg="Sending a request to BitBucket" method=DELETE path=/rest/insights/1.0/projects/prometheus/repos/rules/commits/.*/reports/pint' diff --git a/cmd/pint/tests/0164_ci_comment_resolve_delete.txt b/cmd/pint/tests/0164_ci_comment_resolve_delete.txt index 62d63468..4fcbb3a7 100644 --- a/cmd/pint/tests/0164_ci_comment_resolve_delete.txt +++ b/cmd/pint/tests/0164_ci_comment_resolve_delete.txt @@ -25,7 +25,7 @@ exec git commit -am 'import rules and config' exec git checkout -b modify cp ../src/v1.yml rules.yml exec git commit -am 'v1' -pint.error --no-color ci +! exec pint --no-color ci stderr 'msg="Problems found" Fatal=1' stderr 'msg="Sending a request to BitBucket" method=DELETE path=/rest/insights/1.0/projects/prometheus/repos/rules/commits/.*/reports/pint' stderr 'msg="Sending a request to BitBucket" method=PUT path=/rest/insights/1.0/projects/prometheus/repos/rules/commits/.*/reports/pint' @@ -43,7 +43,7 @@ stderr 'msg="Added pull request comments to BitBucket" count=1' cp ../src/v2.yml rules.yml exec git commit -am 'v2' -pint.ok --no-color ci +exec pint --no-color ci ! stdout . ! stderr 'msg="Problems found"' stderr 'msg="Sending a request to BitBucket" method=DELETE path=/rest/insights/1.0/projects/prometheus/repos/rules/commits/.*/reports/pint' diff --git a/cmd/pint/tests/0165_pint_comment_error.txt b/cmd/pint/tests/0165_pint_comment_error.txt index fbd5b912..961e7fd8 100644 --- a/cmd/pint/tests/0165_pint_comment_error.txt +++ b/cmd/pint/tests/0165_pint_comment_error.txt @@ -1,4 +1,4 @@ -pint.ok --no-color lint --min-severity=info rules +exec pint --no-color lint --min-severity=info rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0166_invalid_label.txt b/cmd/pint/tests/0166_invalid_label.txt index d076f5bd..6dae2a7a 100644 --- a/cmd/pint/tests/0166_invalid_label.txt +++ b/cmd/pint/tests/0166_invalid_label.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0167_rule_duplicate_symlink.txt b/cmd/pint/tests/0167_rule_duplicate_symlink.txt index c992a505..39f639a8 100644 --- a/cmd/pint/tests/0167_rule_duplicate_symlink.txt +++ b/cmd/pint/tests/0167_rule_duplicate_symlink.txt @@ -22,7 +22,7 @@ exec git commit -am 'import rules and config' exec git checkout -b v1 cp ../src/v1.yml rules.yml exec git commit -am 'v1' -pint.ok --no-color ci +exec pint --no-color ci cmp stderr ../stderrV1.txt -- stderrV1.txt -- diff --git a/cmd/pint/tests/0168_watch_rule_files.txt b/cmd/pint/tests/0168_watch_rule_files.txt index e5ff2bde..4c4316fa 100644 --- a/cmd/pint/tests/0168_watch_rule_files.txt +++ b/cmd/pint/tests/0168_watch_rule_files.txt @@ -7,7 +7,7 @@ http start prometheus 127.0.0.1:7168 exec bash -x ./test.sh & -pint.ok --no-color -l debug watch --interval=5s --listen=127.0.0.1:6168 --pidfile=pint.pid rule_files prom +exec pint --no-color -l debug watch --interval=5s --listen=127.0.0.1:6168 --pidfile=pint.pid rule_files prom ! stdout . stderr 'level=DEBUG msg="Glob finder completed" count=2' diff --git a/cmd/pint/tests/0169_watch_rule_files_noprom.txt b/cmd/pint/tests/0169_watch_rule_files_noprom.txt index 6cf7cfce..7e5c183f 100644 --- a/cmd/pint/tests/0169_watch_rule_files_noprom.txt +++ b/cmd/pint/tests/0169_watch_rule_files_noprom.txt @@ -1,4 +1,4 @@ -pint.error --no-color -l debug watch --interval=5s --listen=127.0.0.1:6169 --pidfile=pint.pid rule_files prom +! exec pint --no-color -l debug watch --interval=5s --listen=127.0.0.1:6169 --pidfile=pint.pid rule_files prom ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0170_watch_rule_files_error.txt b/cmd/pint/tests/0170_watch_rule_files_error.txt index 8c220152..e41db0b5 100644 --- a/cmd/pint/tests/0170_watch_rule_files_error.txt +++ b/cmd/pint/tests/0170_watch_rule_files_error.txt @@ -3,7 +3,7 @@ http start prometheus 127.0.0.1:7170 exec bash -x ./test.sh & -pint.ok --no-color -l debug watch --interval=5s --listen=127.0.0.1:6170 --pidfile=pint.pid rule_files prom +exec pint --no-color -l debug watch --interval=5s --listen=127.0.0.1:6170 --pidfile=pint.pid rule_files prom cmp stderr stderr.txt -- stderr.txt -- diff --git a/cmd/pint/tests/0171_rule_duplicate_rename.txt b/cmd/pint/tests/0171_rule_duplicate_rename.txt index ca6af1b3..38c28002 100644 --- a/cmd/pint/tests/0171_rule_duplicate_rename.txt +++ b/cmd/pint/tests/0171_rule_duplicate_rename.txt @@ -26,7 +26,7 @@ exec git commit -am 'v2' exec git mv rules.yaml renamed.yaml exec git commit -am 'v3' -pint.error --no-color ci +! exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0172_rule_dependency_symlink_delete.txt b/cmd/pint/tests/0172_rule_dependency_symlink_delete.txt index 86c7c9e6..b4471885 100644 --- a/cmd/pint/tests/0172_rule_dependency_symlink_delete.txt +++ b/cmd/pint/tests/0172_rule_dependency_symlink_delete.txt @@ -19,7 +19,7 @@ exec git checkout -b v2 exec git rm -fr rules2 exec git commit -am 'v2' -pint.ok -l error --offline --no-color ci +exec pint -l error --offline --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0173_rule_duplicate_move.txt b/cmd/pint/tests/0173_rule_duplicate_move.txt index b2c55999..169f3b29 100644 --- a/cmd/pint/tests/0173_rule_duplicate_move.txt +++ b/cmd/pint/tests/0173_rule_duplicate_move.txt @@ -18,7 +18,7 @@ exec cp -R ../src/v2/rules . exec git add rules exec git commit -am 'v2' -pint.ok --no-color ci +exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0174_auth_publicURI.txt b/cmd/pint/tests/0174_auth_publicURI.txt index 035bda8c..36467e01 100644 --- a/cmd/pint/tests/0174_auth_publicURI.txt +++ b/cmd/pint/tests/0174_auth_publicURI.txt @@ -4,7 +4,7 @@ http auth-response prometheus /api/v1/query_range admin pass 200 {"status":"succ http auth-response prometheus /api/v1/query admin pass 200 {"status":"success","data":{"resultType":"vector","result":[]}} http start prometheus 127.0.0.1:7174 -pint.error -l debug --no-color lint rules +! exec pint -l debug --no-color lint rules ! stdout . ! stderr 'admin:pass' stderr 'http://admin@127.0.0.1:7174' diff --git a/cmd/pint/tests/0175_strict_multi_doc.txt b/cmd/pint/tests/0175_strict_multi_doc.txt index 038d3d5d..98daabbb 100644 --- a/cmd/pint/tests/0175_strict_multi_doc.txt +++ b/cmd/pint/tests/0175_strict_multi_doc.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0176_comments.txt b/cmd/pint/tests/0176_comments.txt index d88ac79f..9e47dbab 100644 --- a/cmd/pint/tests/0176_comments.txt +++ b/cmd/pint/tests/0176_comments.txt @@ -5,7 +5,7 @@ http response prometheus /api/v1/query_range 200 {"status":"success","data":{"re http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[]}} http start prometheus 127.0.0.1:7176 -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0177_rule_name.txt b/cmd/pint/tests/0177_rule_name.txt index affdf6b8..50a8b03e 100644 --- a/cmd/pint/tests/0177_rule_name.txt +++ b/cmd/pint/tests/0177_rule_name.txt @@ -1,4 +1,4 @@ -pint.error --no-color lint rules +! exec pint --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0178_parser_include.txt b/cmd/pint/tests/0178_parser_include.txt index 4892da95..45f2c3de 100644 --- a/cmd/pint/tests/0178_parser_include.txt +++ b/cmd/pint/tests/0178_parser_include.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0179_parser_exclude.txt b/cmd/pint/tests/0179_parser_exclude.txt index aa000c5c..9e7e4376 100644 --- a/cmd/pint/tests/0179_parser_exclude.txt +++ b/cmd/pint/tests/0179_parser_exclude.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0180_parser_exclude_md.txt b/cmd/pint/tests/0180_parser_exclude_md.txt index 5a4f2edd..29638a1f 100644 --- a/cmd/pint/tests/0180_parser_exclude_md.txt +++ b/cmd/pint/tests/0180_parser_exclude_md.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color lint rules +exec pint -l debug --no-color lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0181_range_query_max.txt b/cmd/pint/tests/0181_range_query_max.txt index 6ec8d32f..1acd287b 100644 --- a/cmd/pint/tests/0181_range_query_max.txt +++ b/cmd/pint/tests/0181_range_query_max.txt @@ -1,5 +1,5 @@ env NO_COLOR=1 -pint.ok --no-color lint --min-severity=info rules +exec pint --no-color lint --min-severity=info rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0182_range_query_custom_severity.txt b/cmd/pint/tests/0182_range_query_custom_severity.txt index 6b5191f5..9bc4c397 100644 --- a/cmd/pint/tests/0182_range_query_custom_severity.txt +++ b/cmd/pint/tests/0182_range_query_custom_severity.txt @@ -1,5 +1,5 @@ env NO_COLOR=1 -pint.error --no-color lint --min-severity=info rules +! exec pint --no-color lint --min-severity=info rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0183_cli_enable.txt b/cmd/pint/tests/0183_cli_enable.txt index 54d4703e..58a1c1f3 100644 --- a/cmd/pint/tests/0183_cli_enable.txt +++ b/cmd/pint/tests/0183_cli_enable.txt @@ -1,4 +1,4 @@ -pint.ok -l debug --no-color -e promql/aggregate lint rules +exec pint -l debug --no-color -e promql/aggregate lint rules ! stdout . cmp stderr stderr.txt diff --git a/cmd/pint/tests/0184_ci_file_ignore.txt b/cmd/pint/tests/0184_ci_file_ignore.txt index 93068a35..e3e796b1 100644 --- a/cmd/pint/tests/0184_ci_file_ignore.txt +++ b/cmd/pint/tests/0184_ci_file_ignore.txt @@ -16,7 +16,7 @@ exec touch .keep exec git add .keep exec git commit -am 'v2' -pint.ok --no-color ci +exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0185_state_empty.txt b/cmd/pint/tests/0185_state_empty.txt index 03d40fdc..96f3d093 100644 --- a/cmd/pint/tests/0185_state_empty.txt +++ b/cmd/pint/tests/0185_state_empty.txt @@ -16,7 +16,7 @@ exec touch .keep exec git add .keep exec git commit -am 'v2' -pint.ok --no-color ci +exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0186_ci_state_any.txt b/cmd/pint/tests/0186_ci_state_any.txt index bd334e34..2cd3ee72 100644 --- a/cmd/pint/tests/0186_ci_state_any.txt +++ b/cmd/pint/tests/0186_ci_state_any.txt @@ -16,7 +16,7 @@ exec touch .keep exec git add .keep exec git commit -am 'v2' -pint.error --no-color ci +! exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt diff --git a/cmd/pint/tests/0187_ci_noop_yaml_parse.txt b/cmd/pint/tests/0187_ci_noop_yaml_parse.txt index c271936e..756759f7 100644 --- a/cmd/pint/tests/0187_ci_noop_yaml_parse.txt +++ b/cmd/pint/tests/0187_ci_noop_yaml_parse.txt @@ -16,7 +16,7 @@ exec touch .keep exec git add .keep exec git commit -am 'v2' -pint.ok --no-color ci +exec pint --no-color ci ! stdout . cmp stderr ../stderr.txt