From 93ab3f326c62284eaabbe37039f7de69cd7ca62a Mon Sep 17 00:00:00 2001 From: evangelostsak Date: Wed, 14 Oct 2026 00:27:17 +0200 Subject: [PATCH] test(ci): hold both mesh arms inside every default sweep Eight compose-or-swarm rows over eight sweeps: each sweep must put swarm rows on the meshed and the direct arm, and no compose row may carry the mesh. Fails on the previous wants_vpn, which held every swarm row of a sweep on one arm. --- .../python/utils/github/variant/test_axes.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/unit/python/utils/github/variant/test_axes.py b/tests/unit/python/utils/github/variant/test_axes.py index 5f666da266..28012a8733 100644 --- a/tests/unit/python/utils/github/variant/test_axes.py +++ b/tests/unit/python/utils/github/variant/test_axes.py @@ -323,6 +323,29 @@ class TestAssign(unittest.TestCase): self.assertNotIn("false", [e["tor"] for e in entries]) +class TestMeshRotation(unittest.TestCase): + _ROWS = tuple(_row("web-app-b", 0, ("compose", "swarm")) for _ in range(8)) + + def _entries(self, sweep: int) -> list[dict[str, str]]: + return _assign( + self._ROWS, sweep=sweep, tor_mode="auto", variants_per_app=_VARIANTS + ) + + def test_every_sweep_lands_swarm_rows_on_both_arms(self) -> None: + for sweep in range(8): + with self.subTest(sweep=sweep): + arms = {e["vpn"] for e in self._entries(sweep) if e["mode"] == "swarm"} + self.assertEqual(arms, {"true", "false"}) + + def test_a_compose_row_never_carries_the_mesh(self) -> None: + for sweep in range(8): + with self.subTest(sweep=sweep): + arms = { + e["vpn"] for e in self._entries(sweep) if e["mode"] == "compose" + } + self.assertEqual(arms, {"false"}) + + class TestPinnedAxes(unittest.TestCase): def _entries(self, row: dict) -> list[dict[str, str]]: return _assign([row], sweep=0, tor_mode="auto", variants_per_app=_VARIANTS)