mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #51312 from austinvazquez/refactor-client-container-wait
client: refactor ContainerWait to use client defined options/results structs
This commit is contained in:
@@ -820,12 +820,12 @@ func (s *DockerAPISuite) TestContainerAPIWait(c *testing.T) {
|
||||
assert.NilError(c, err)
|
||||
defer apiClient.Close()
|
||||
|
||||
waitResC, errC := apiClient.ContainerWait(testutil.GetContext(c), name, "")
|
||||
wait := apiClient.ContainerWait(testutil.GetContext(c), name, client.ContainerWaitOptions{})
|
||||
|
||||
select {
|
||||
case err = <-errC:
|
||||
case err = <-wait.Errors:
|
||||
assert.NilError(c, err)
|
||||
case waitRes := <-waitResC:
|
||||
case waitRes := <-wait.Results:
|
||||
assert.Equal(c, waitRes.StatusCode, int64(0))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user