diff --git a/tests/test_gen_supervisord.py b/tests/test_gen_supervisord.py index d7c5c74..a127e15 100644 --- a/tests/test_gen_supervisord.py +++ b/tests/test_gen_supervisord.py @@ -39,10 +39,19 @@ def test_it_is_valid_ini_with_a_supervisord_section(): def test_every_lane_gets_a_program(): """One image carries every lane since step 6, so nothing is conditional. - A lane in LANES with no program is a queue with no consumer.""" + A lane in LANES with no program is a queue with no consumer. + + Compared over the `program:` sections ONLY, both directions: no lane + without a program, and no program that is not a lane. It used to compare + every section minus `[supervisord]`, which made it fail the moment the + config grew non-program plumbing — the control socket did exactly that, + and the property it exists for had not moved at all. A guard that fires on + a correct change is one people learn to edit rather than read. + """ cp = _parse() + programs = {s for s in cp.sections() if s.startswith("program:")} expected = {"program:web"} | {f"program:{lane.name}" for lane in LANES} - assert set(cp.sections()) - {"supervisord"} == expected + assert programs == expected def test_the_ml_lane_runs_even_though_it_ships_disabled():