Skip to content

tests: restore the two regression cases the #3502 test patch absorbed #3507

Backlog

Description

@Birfy

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 / Config assertions 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:

  1. Restore the two methods above verbatim; leave the absorbing tests with only their own assertions.
  2. 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.
  3. 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.py to
    26, tests/test_dsbot_gateway.py to 33, with no other case removed.
  • python -m unittest discover -s tests passes 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.

Related #3502
Refs #3504

Activity

  1. added
    agent-ready
    on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions