diff --git a/tests/unit/python/utils/github/variant/test_axes.py b/tests/unit/python/utils/github/variant/test_axes.py index 03e0e6251b..7eec0154d2 100644 --- a/tests/unit/python/utils/github/variant/test_axes.py +++ b/tests/unit/python/utils/github/variant/test_axes.py @@ -111,6 +111,7 @@ class TestArtifactSlug(unittest.TestCase): entry["tor"] == "true", entry["distro"], entry["filesystem"], + entry["vpn"] == "true", ), ), ) @@ -222,7 +223,7 @@ class TestPriorityCoverage(unittest.TestCase): def test_an_incapable_priority_variant_skips_its_onion_runs(self) -> None: rows = [_row("web-app-a", 1, ("compose", "swarm"), priority=True)] entries = _assign(rows, sweep=0, tor_mode="auto", variants_per_app=_VARIANTS) - self.assertEqual([e["tor"] for e in entries], ["false", "false"]) + self.assertEqual({e["tor"] for e in entries}, {"false"}) class TestAssign(unittest.TestCase): @@ -371,6 +372,7 @@ class TestPinnedAxes(unittest.TestCase): priority=True, pin_mode="swarm", pin_tor=False, + pin_vpn=False, ) self.assertEqual(len(self._entries(row)), 1) @@ -447,7 +449,13 @@ class TestDistroAndFilesystemAxes(unittest.TestCase): def test_a_priority_row_spreads_its_combinations_over_the_pool(self) -> None: rows = [_row("web-app-b", 0, ("compose", "swarm"), priority=True)] entries = _assign(rows, sweep=0, tor_mode="auto", variants_per_app=_VARIANTS) - self.assertEqual(len({e["distro"] for e in entries}), len(entries)) + self.assertEqual( + len({e["distro"] for e in entries}), + min(len(entries), len(axes.DISTROS)), + "a priority row must walk the pool, not repeat one distribution; " + "once it has more combinations than the pool has members, the " + "rotation wraps and every distribution is proven at least once", + ) def test_a_pinned_distro_replaces_the_rotation(self) -> None: rows = [_row("web-app-b", 0, ("compose",), pin_distro="fedora")]