test(docker): host-wide log search includes the removed container's line
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -199,7 +199,8 @@ def test_docker_and_agent_tools_over_seeded_rows(app):
|
||||
page2 = await dtools.search_container_logs(container=web, limit=2, before=page1["next_before"])
|
||||
assert [m["line"] for m in page2["matches"]] == ["ERROR: 100% of disk_used", "connected to db"]
|
||||
errs = await dtools.search_container_logs(host=host_name, stream="stderr")
|
||||
assert [m["container_name"] for m in errs["matches"]] == [web]
|
||||
# Host-wide search reaches a removed container's lines too.
|
||||
assert [m["container_name"] for m in errs["matches"]] == [web, removed]
|
||||
with pytest.raises(ValueError, match="context needs `container`"):
|
||||
await dtools.search_container_logs(text="x", context=2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user