test(topology): cover compose labels and tolerate docker filter kwarg

test_compose asserts the new decnet.topology.* labels land on both base
deckies (role=base, no service marker) and service fragments
(service=true). The stub docker client in test_deploy grew a filters
kwarg so it keeps matching the real .networks.list(filters=...) call
signature now used by the deployer.
This commit is contained in:
2026-04-21 10:24:15 -04:00
parent 071312fc0c
commit d9f3824086
2 changed files with 35 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ async def test_deploy_failure_transitions_to_failed(repo, tmp_path, monkeypatch)
class _BoomClient:
def __init__(self):
self.networks = self
def list(self, names=None): # noqa: ARG002
def list(self, names=None, filters=None): # noqa: ARG002
return []
def create(self, *a, **kw): # noqa: ARG002
raise RuntimeError("boom: docker daemon unreachable")
@@ -107,7 +107,7 @@ async def test_teardown_from_failed_marks_torn_down(repo, tmp_path, monkeypatch)
class _StubClient:
def __init__(self):
self.networks = self
def list(self, names=None): # noqa: ARG002
def list(self, names=None, filters=None): # noqa: ARG002
return []
with patch("decnet.engine.deployer.docker.from_env", return_value=_StubClient()):