diff --git a/tests/plugins/host_agent/test_agent_docker.py b/tests/plugins/host_agent/test_agent_docker.py index 6bbe07d..dbf7044 100644 --- a/tests/plugins/host_agent/test_agent_docker.py +++ b/tests/plugins/host_agent/test_agent_docker.py @@ -569,7 +569,7 @@ def test_collect_docker_logs_since_cursor_and_dedup(monkeypatch): def fake_raw(socket_path, path, timeout=a.DOCKER_API_TIMEOUT): calls.append(path) - if "tail=" in path: # first interval seeds from a tail + if "since=" not in path: # first interval seeds from a tail alone return _frame(1, f"{t1} a\n".encode()) + _frame(1, f"{t2} b\n".encode()) # second interval: daemon re-returns the boundary line (t2) + a new one return _frame(1, f"{t2} b\n".encode()) + _frame(1, f"{t3} c\n".encode()) @@ -584,6 +584,7 @@ def test_collect_docker_logs_since_cursor_and_dedup(monkeypatch): # boundary line b (t2) deduped against the cursor; only c (t3) is new assert [r["line"] for r in second] == ["c"] assert "since=" in calls[1] + assert f"tail={a.DOCKER_LOG_MAX_LINES}" in calls[1] # bounded even since the cursor (#5764) def test_collect_docker_logs_excludes_and_skips_non_running(monkeypatch):