test(host_agent): the first log read is the one without since=, now that every read has a tail (#5764)
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m20s
CI / unit (push) Successful in 1m26s
CI / publish (push) Successful in 1m4s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 18:04:41 -04:00
co-authored by Claude Opus 5.5
parent a805e1d539
commit b1db1e8b0d
@@ -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):