Repository navigation
Description
What is wrong
The test patch merged in #3504 (f255a7f5) added four new cases, but two existing test methods lost
their def line and had their bodies folded into the new tests. The assertions still run, but the case
names are gone from the suite:
tests/test_management.py::test_origin_configuration_requires_explicit_loopback_cookie_downgrade
(its origin /Configassertions now sit in the second half of
test_forwarded_header_from_the_edge_must_be_one_address)tests/test_dsbot_gateway.py::test_bot_social_socket_routes_only_shared_runtime_api
(its socket assertions now sit in the second half of
test_nginx_hands_the_edge_the_client_address_to_the_auth_limits)
Counts, measured on both trees: the suite goes from 379 cases at 9c230f8b (c7c27e22) to 381 at
f255a7f5, which is +4 -2. Per file, test_management.py goes from 23 to 25 (three cases added, the
origin case absorbed) and tests/test_dsbot_gateway.py stays at 32 (one added, the socket case absorbed).
A regression in either area now fails under an unrelated name, and a future change can silently drop the
absorbed assertions with the suite still green.
What to do
A tests-only change, both original cases restored as independent methods with their c7c27e22 bodies:
- Restore the two methods above verbatim; leave the absorbing tests with only their own assertions.
- Do not remove or weaken the four new authentication / rendering assertions added by auth: key the peer rate-limit bucket on the trusted proxy address #3504.
- Touch only the two files under
tests/. No product code, no gateway or HAProxy configuration.
Acceptance
- Both original case names are present again, and
def test_counts only grow:test_management.pyto
26,tests/test_dsbot_gateway.pyto 33, with no other case removed. python -m unittest discover -s testspasses and reports 383 cases (381 + 2), with the four new
cases from auth: key the peer rate-limit bucket on the trusted proxy address #3504 still running.- The restored cases still fail when their assertion target is reverted, so they are guards, not decoration.
Activity