mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #51317 from austinvazquez/refactor-client-container-logs
client: refactor `ContainerLogs` to wrap result
This commit is contained in:
@@ -30,10 +30,8 @@ func TestLogsFollowTailEmpty(t *testing.T) {
|
||||
id := container.Run(ctx, t, apiClient, container.WithCmd("sleep", "100000"))
|
||||
|
||||
logs, err := apiClient.ContainerLogs(ctx, id, client.ContainerLogsOptions{ShowStdout: true, Tail: "2"})
|
||||
if logs != nil {
|
||||
defer logs.Close()
|
||||
}
|
||||
assert.Check(t, err)
|
||||
defer logs.Close()
|
||||
|
||||
_, err = stdcopy.StdCopy(io.Discard, io.Discard, logs)
|
||||
assert.Check(t, err)
|
||||
|
||||
Reference in New Issue
Block a user