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
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user