From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 4 Dec 2025 13:11:12 +0000 (-0500) Subject: Tolerate promtool failing with exit code 3 X-Git-Tag: rec-5.4.0-alpha1~26^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bed3094bf1b41de5c35b2b04769b1a0c41bf6352;p=thirdparty%2Fpdns.git Tolerate promtool failing with exit code 3 Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- diff --git a/regression-tests.dnsdist/test_Prometheus.py b/regression-tests.dnsdist/test_Prometheus.py index efc913f370..b41ce956b8 100644 --- a/regression-tests.dnsdist/test_Prometheus.py +++ b/regression-tests.dnsdist/test_Prometheus.py @@ -94,9 +94,9 @@ class TestPrometheus(DNSDistTest): except subprocess.CalledProcessError as exc: raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, process.output)) - # commented out because promtool returns 3 because of the "_total" suffix warnings - #if process.returncode != 0: - # raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, output)) + # promtool returns 3 because of the "_total" suffix warnings + if not process.returncode in [0, 3]: + raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, output)) for line in output[0].splitlines(): if line.endswith(b"should have \"_total\" suffix"): diff --git a/regression-tests.ixfrdist/test_Stats.py b/regression-tests.ixfrdist/test_Stats.py index 1be5735c0d..a8d4e69d41 100644 --- a/regression-tests.ixfrdist/test_Stats.py +++ b/regression-tests.ixfrdist/test_Stats.py @@ -60,9 +60,9 @@ webserver-address: %s except subprocess.CalledProcessError as exc: raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, process.output)) - # commented out because promtool returns 3 because of the "_total" suffix warnings - #if process.returncode != 0: - # raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, output)) + # promtool returns 3 because of the "_total" suffix warnings + if not process.returncode in [0, 3]: + raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, output)) for line in output[0].splitlines(): if line.endswith(b"should have \"_total\" suffix"): diff --git a/regression-tests.recursor-dnssec/test_Prometheus.py b/regression-tests.recursor-dnssec/test_Prometheus.py index 197b527398..a618ae4db4 100644 --- a/regression-tests.recursor-dnssec/test_Prometheus.py +++ b/regression-tests.recursor-dnssec/test_Prometheus.py @@ -29,9 +29,9 @@ class RecPrometheusTest(RecursorTest): except subprocess.CalledProcessError as exc: raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, process.output)) - # commented out because promtool returns 3 because of the "_total" suffix warnings - #if process.returncode != 0: - # raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, output)) + # promtool returns 3 because of the "_total" suffix warnings + if not process.returncode in [0, 3]: + raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, output)) for line in output[0].splitlines(): if line.endswith(b"should have \"_total\" suffix"):