test: e2e test for client.ServiceLogs

This commit is contained in:
Pasha Sviderski
2025-12-04 14:24:10 +10:00
parent 1e6aaf451e
commit 4fa30ab8cb
3 changed files with 120 additions and 7 deletions
+6
View File
@@ -94,6 +94,12 @@ func (cli *Client) ContainerLogs(
Since: opts.Since,
Until: opts.Until,
}
if !opts.Follow && opts.Tail == 0 {
// If not following and tail is 0, set tail to -1 to return all logs.
// Otherwise, no logs will be returned at all.
req.Tail = -1
}
stream, err := cli.Docker.GRPCClient.ContainerLogs(proxyCtx, req)
if err != nil {
return nil, err