fix(docker): enumerate the active infra network
tracker-policy-pr / check-pr (pull_request) Successful in 21s
test / image-input-builds (pull_request) Successful in 59s
test / unit (pull_request) Successful in 1m2s
test / integration-docker (pull_request) Successful in 1m2s
test / coverage (pull_request) Successful in 15s
lint / lint (push) Successful in 58s

This commit is contained in:
2026-07-27 16:44:00 +00:00
parent e49f9a4e53
commit 3dc901c057
2 changed files with 15 additions and 1 deletions
@@ -297,6 +297,16 @@ class TestDockerAttachPrimitives(unittest.TestCase):
self.assertEqual("ITEST-CA", res.ca_pem)
infra.gateway.assert_called_once()
def test_running_bottles_uses_the_threaded_infra_network(self) -> None:
from bot_bottle.backend.docker.backend import DockerBottleBackend
infra = Mock(network="itest-network")
infra.gateway.return_value.name = "itest-gateway"
with patch.object(docker, "running_agent_containers") as running:
DockerBottleBackend(infra=infra)._running_bottles()
running.assert_called_once_with(
network="itest-network", gateway_name="itest-gateway",
)
def test_gateway_attach_resources_defaults_to_the_host_singleton(self) -> None:
# Ordinary construction (no infra) falls back to the per-host default.
from bot_bottle.backend.docker.backend import DockerBottleBackend