From 06b7c31e25ea355946814da03749ae197c68d969 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 27 Oct 2026 03:24:12 +0100 Subject: Fix some tests to match retired stats modes and wrong config file ordering --- tests/integration/test_stats.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tests/integration/test_stats.py') diff --git a/tests/integration/test_stats.py b/tests/integration/test_stats.py index 7ff9a38..820b917 100644 --- a/tests/integration/test_stats.py +++ b/tests/integration/test_stats.py @@ -16,8 +16,7 @@ from harness import TrackerTestCase # The modes a default build answers. "tpbs" and "statedump" are full scrapes # and belong to test_fullscrape; "fulllog" and "woodpeckers" sit behind -# feature flags this build does not set; "busy" is advertised but unbuilt, -# which the next case pins. +# feature flags this build does not set. MRTG_MODES = ["peer", "conn", "scrp", "udp4", "tcp4", "torr", "fscr", "completed", "syncs"] TEXT_MODES = ["herr", "s24s", "top10", "top100", "renew", "version"] @@ -36,14 +35,14 @@ class StatsShape(TrackerTestCase): for line in lines[:2]: self.assertRegex(line, rb"^\d+$", "mode %s line %r" % (mode, line)) - def test_the_busy_mode_is_advertised_but_not_built(self): - """TASK_STATS_BUSY_NETWORKS is in the enum and in the mode table, and - no switch anywhere handles it, so the worker frees the empty answer - and the request ends as a server error. Pinned rather than blessed: - either the report gets written or the mode leaves the table.""" + def test_the_busy_mode_is_gone(self): + """It was listed in the mode table and implemented nowhere, so it only + ever answered 500. Removed rather than written: picking poisoning + networks out stopped being meaningful once consumer lines became bot + hosts and v6 made the address space too large to watch.""" with self.assertRaises(urllib.error.HTTPError) as caught: self.tracker.stats("busy") - self.assertEqual(caught.exception.code, 500) + self.assertEqual(caught.exception.code, 400, "an unknown mode, like any other") def test_an_unknown_mode_is_refused(self): with self.assertRaises(urllib.error.HTTPError) as caught: -- cgit v1.3