1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

13 commits

Author SHA1 Message Date
Daniel Nephin
d7022f2b46 Create a unified RunCommand function with Assert()
Remove some run functions and replace them with the unified run command.
Remove DockerCmdWithStdoutStderr
Remove many duplicate runCommand functions.
Also add dockerCmdWithResult()
Allow Result.Assert() to ignore the error message if an exit status is expected.
Fix race in DockerSuite.TestDockerInspectMultipleNetwork
Fix flaky test DockerSuite.TestRunInteractiveWithRestartPolicy

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-23 15:11:46 -04:00
Brian Goff
abbf2aa6dd Fix events test flakiness.
Since channel is getting a send instead of a close now, this can cause
random issues ranging through the list of channels if the channel is
unbuffered since the send may be blocked.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-18 16:10:29 -05:00
Zhang Wei
62a856e912 Assert error in body of function inspectField*
1. Replace raw `docker inspect -f xxx` with `inspectField`, to make code
cleaner and more consistent
2. assert the error in function `inspectField*` so we don't need to
assert the return value of it every time, this will make inspect easier.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-01-29 23:39:07 +08:00
David Calavera
27b060492c Fix channel closing race in event tests.
Divide event matching into two functions, a matcher and
a processor. That way, the error handling doesn't call
the channel closing logic at all.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-22 13:31:46 -05:00
David Calavera
851fe00c64 Add filter by event type and documentation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-04 14:58:04 -05:00
David Calavera
9aad7d209f Move test out of the windows build.
Because it can still run on windows server and fail because it doesn't
have `chown`.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-30 16:36:48 -05:00
Qiang Huang
1b34008532 Handle error for dockerCmdInDir
Only two of these are not handled, the one in `TestBuildForceRm`
is intended to not be handled, while the other one in
`TestBuildResourceConstraintsAreUsed` causes problem.

In test case `TestBuildResourceConstraintsAreUsed`, somehow we
are not able to access network to get base image, but the error
message is:

```
Error: failed to inspect container : Unable to read inspect data: json: cannot unmarshal array into Go value of type types.ContainerJSON
```

Totally confusion.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-30 15:21:34 +08:00
Daniel Nephin
83237aab2b Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-23 13:27:58 -05:00
Hu Keping
f410d7e70f Update docker_cli_build_unix_test
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-10-26 21:06:11 +08:00
Lei
877dbbbde8 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-07-23 10:26:06 +08:00
Ben Firshman
6b3c928140 Fix golint warnings for integration-cli
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-07-22 14:03:50 +01:00
Vincent Demeester
5c295460da Use dockerCmd when possible (#14603)
- integration-cli/docker_cli_attach_test.go
- integration-cli/docker_cli_attach_unix_test.go
- integration-cli/docker_cli_build_test.go
- integration-cli/docker_cli_build_unix_test.go
- integration-cli/docker_cli_by_digest_test.go
- integration-cli/docker_cli_commit_test.go
- integration-cli/docker_cli_config_test.go
- integration-cli/docker_cli_cp_test.go
- integration-cli/docker_cli_create_test.go
- integration-cli/docker_cli_pause_test.go
- integration-cli/docker_cli_port_test.go
- integration-cli/docker_cli_port_unix_test.go
- integration-cli/docker_cli_proxy_test.go
- integration-cli/docker_cli_ps_test.go
- integration-cli/docker_cli_pull_test.go
- integration-cli/docker_cli_push_test.go

- docker_api_attach_test.go
- docker_api_containers_test.go
- docker_api_events_test.go
- docker_api_exec_resize_test.go
- docker_api_exec_test.go
- docker_api_images_test.go
- docker_api_info_test.go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-14 21:52:43 +02:00
David Calavera
a914101296 Do not require cgroups capabilities on windows to run the integration tests.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-05-29 11:42:40 -07:00