mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-09-09 21:49:37 +00:00
test: isolate Docker bridge gateway fallback from host DNS (#5107)
* test: isolate Docker bridge gateway fallback from host DNS Force the fallback-path test to bypass host DNS resolution. Production bind-host behavior is unchanged. Refs #5106 * test: document Docker fallback isolation Explain why the fallback test must replace host DNS resolution. Refs #5106
This commit is contained in:
parent
11e6cdd7e7
commit
42796d7086
@ -323,6 +323,7 @@ def test_start_container_brackets_bare_ipv6_bind_override(monkeypatch):
|
||||
|
||||
|
||||
def test_start_container_binds_dood_port_to_bridge_gateway(monkeypatch):
|
||||
"""Force resolver failure so host DNS cannot bypass the bridge-gateway fallback."""
|
||||
backend = LocalContainerBackend(
|
||||
image="sandbox:latest",
|
||||
base_port=8080,
|
||||
@ -332,6 +333,10 @@ def test_start_container_binds_dood_port_to_bridge_gateway(monkeypatch):
|
||||
)
|
||||
monkeypatch.setenv("DEER_FLOW_SANDBOX_HOST", "host.docker.internal")
|
||||
monkeypatch.delenv("DEER_FLOW_SANDBOX_BIND_HOST", raising=False)
|
||||
monkeypatch.setattr(
|
||||
"deerflow.community.aio_sandbox.local_backend._resolve_sandbox_host_address",
|
||||
lambda host: None,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"deerflow.community.aio_sandbox.local_backend._docker_bridge_gateway_ip",
|
||||
lambda: "172.17.0.1",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user