]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Tolerate promtool failing with exit code 3
authorJosh Soref <2119212+jsoref@users.noreply.github.com>
Thu, 4 Dec 2025 13:11:12 +0000 (08:11 -0500)
committerJosh Soref <2119212+jsoref@users.noreply.github.com>
Thu, 4 Dec 2025 13:11:12 +0000 (08:11 -0500)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
regression-tests.dnsdist/test_Prometheus.py
regression-tests.ixfrdist/test_Stats.py
regression-tests.recursor-dnssec/test_Prometheus.py

index efc913f3700946e7b7fa91e143f2aee8ac342457..b41ce956b80cd9d2f173799efa82d2afa19b287e 100644 (file)
@@ -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"):
index 1be5735c0de87c33abeef4d4a7002789723ca20e..a8d4e69d41320ecb5ff76a9f6f006a066041e8fb 100644 (file)
@@ -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"):
index 197b527398f8fd9c85158017d223bc2164a51ede..a618ae4db49eaf7d5f2cea33872cc09a82a9be24 100644 (file)
@@ -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"):