mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
misspell: fix some spelling issues
``` internal/test/environment/environment.go:37:23: `useing` is a misspelling of `using`(misspell) integration/container/wait_test.go:49:9: `waitres` is a misspelling of `waiters`(misspell) integration/container/wait_test.go:95:9: `waitres` is a misspelling of `waiters`(misspell) integration-cli/docker_api_containers_test.go:1042:7: `waitres` is a misspelling of `waiters`(misspell) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e34c081354
commit
101ff26eb5
3 changed files with 10 additions and 10 deletions
|
@ -994,13 +994,13 @@ func (s *DockerSuite) TestContainerAPIWait(c *testing.T) {
|
||||||
assert.NilError(c, err)
|
assert.NilError(c, err)
|
||||||
defer cli.Close()
|
defer cli.Close()
|
||||||
|
|
||||||
waitresC, errC := cli.ContainerWait(context.Background(), name, "")
|
waitResC, errC := cli.ContainerWait(context.Background(), name, "")
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case err = <-errC:
|
case err = <-errC:
|
||||||
assert.NilError(c, err)
|
assert.NilError(c, err)
|
||||||
case waitres := <-waitresC:
|
case waitRes := <-waitResC:
|
||||||
assert.Equal(c, waitres.StatusCode, int64(0))
|
assert.Equal(c, waitRes.StatusCode, int64(0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,12 +42,12 @@ func TestWaitNonBlocked(t *testing.T) {
|
||||||
containerID := container.Run(ctx, t, cli, container.WithCmd("sh", "-c", tc.cmd))
|
containerID := container.Run(ctx, t, cli, container.WithCmd("sh", "-c", tc.cmd))
|
||||||
poll.WaitOn(t, container.IsInState(ctx, cli, containerID, "exited"), poll.WithTimeout(30*time.Second), poll.WithDelay(100*time.Millisecond))
|
poll.WaitOn(t, container.IsInState(ctx, cli, containerID, "exited"), poll.WithTimeout(30*time.Second), poll.WithDelay(100*time.Millisecond))
|
||||||
|
|
||||||
waitresC, errC := cli.ContainerWait(ctx, containerID, "")
|
waitResC, errC := cli.ContainerWait(ctx, containerID, "")
|
||||||
select {
|
select {
|
||||||
case err := <-errC:
|
case err := <-errC:
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
case waitres := <-waitresC:
|
case waitRes := <-waitResC:
|
||||||
assert.Check(t, is.Equal(tc.expectedCode, waitres.StatusCode))
|
assert.Check(t, is.Equal(tc.expectedCode, waitRes.StatusCode))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ func TestWaitBlocked(t *testing.T) {
|
||||||
containerID := container.Run(ctx, t, cli, container.WithCmd("sh", "-c", tc.cmd))
|
containerID := container.Run(ctx, t, cli, container.WithCmd("sh", "-c", tc.cmd))
|
||||||
poll.WaitOn(t, container.IsInState(ctx, cli, containerID, "running"), poll.WithTimeout(30*time.Second), poll.WithDelay(100*time.Millisecond))
|
poll.WaitOn(t, container.IsInState(ctx, cli, containerID, "running"), poll.WithTimeout(30*time.Second), poll.WithDelay(100*time.Millisecond))
|
||||||
|
|
||||||
waitresC, errC := cli.ContainerWait(ctx, containerID, "")
|
waitResC, errC := cli.ContainerWait(ctx, containerID, "")
|
||||||
|
|
||||||
err := cli.ContainerStop(ctx, containerID, nil)
|
err := cli.ContainerStop(ctx, containerID, nil)
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
@ -92,8 +92,8 @@ func TestWaitBlocked(t *testing.T) {
|
||||||
select {
|
select {
|
||||||
case err := <-errC:
|
case err := <-errC:
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
case waitres := <-waitresC:
|
case waitRes := <-waitResC:
|
||||||
assert.Check(t, is.Equal(tc.expectedCode, waitres.StatusCode))
|
assert.Check(t, is.Equal(tc.expectedCode, waitRes.StatusCode))
|
||||||
case <-time.After(2 * time.Second):
|
case <-time.After(2 * time.Second):
|
||||||
t.Fatal("timeout waiting for `docker wait`")
|
t.Fatal("timeout waiting for `docker wait`")
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ type PlatformDefaults struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new Execution struct
|
// New creates a new Execution struct
|
||||||
// This is configured useing the env client (see client.FromEnv)
|
// This is configured using the env client (see client.FromEnv)
|
||||||
func New() (*Execution, error) {
|
func New() (*Execution, error) {
|
||||||
c, err := client.NewClientWithOpts(client.FromEnv)
|
c, err := client.NewClientWithOpts(client.FromEnv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue