deer-flow/backend/tests/test_workflow_acceptance_routing.py
Xuehao Xu cfe2bec371
feat(workflows): add multi-Gateway coordination and session-authorized failover (#7138)
* feat(workflows): add leased multi-Gateway coordination and fenced dispatch

* test(workflows): validate deployed failover and canonicalize config revisions

* fix(workflows): share namespace across registration and lease fencing

* fix(workflows): recover interrupted cancellation without admission caps

* fix(workflows): retain execution lease through child cleanup

* docs: trim guidance padding to fit merged instruction budget

* fix(workflows): release rejected admission slots and normalize gateway routing

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-23 23:31:43 +08:00

20 lines
614 B
Python

"""nginx retry histories must identify the final Gateway, not each attempt."""
import httpx
import pytest
from test_workflow_gateway_acceptance import final_gateway_port
@pytest.mark.parametrize(
"history, expected",
[
("192.0.2.1:8001", 8001),
("[2001:db8::1]:8001, 192.0.2.1:8001", 8001),
("192.0.2.1:8001, [2001:db8::1]:8002, 192.0.2.1:8002", 8002),
("[2001:db8::1]:8002", 8002),
],
)
def test_final_gateway_port(history, expected):
response = httpx.Response(200, headers={"X-Acceptance-Upstream": history})
assert final_gateway_port(response) == expected