test(docker): update network-reuse harness fake ps output for egress-aware 3-field probe
test_docker_network_config.py landed on main after the #58489 revert and stubbed docker ps with the 2-field ID\tState format. The re-landed egress-aware reuse probe requests ID\tState\tEgressLabel when egress is off, so the fake line failed to parse and the reuse path never fired. Fixture-only change; production behavior is unchanged.
This commit is contained in:
parent
397e9fc1e4
commit
077e41330d
|
|
@ -130,7 +130,10 @@ def _reuse_guard_harness(monkeypatch, *, existing_mode: str, network: bool):
|
|||
stdout = ""
|
||||
|
||||
if len(cmd) > 1 and cmd[1] == "ps":
|
||||
Result.stdout = "existing-container-id\trunning\n"
|
||||
# Matches the egress-aware reuse probe: with egress off the
|
||||
# format string is ID\tState\tEgressLabel and docker renders a
|
||||
# missing label as "<no value>".
|
||||
Result.stdout = "existing-container-id\trunning\t<no value>\n"
|
||||
elif len(cmd) > 1 and cmd[1] == "inspect":
|
||||
Result.stdout = f"{existing_mode}\n"
|
||||
elif len(cmd) > 1 and cmd[1] == "run":
|
||||
|
|
|
|||
Loading…
Reference in New Issue