Commit graph

20 commits

Author SHA1 Message Date
Tonis Tiigi
9d8f01b4f5 Improve TestAttachClosedOnContainerStop
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-10-05 15:52:09 -07:00
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
Arnaud Porterie
a943c40150 Improve remote integration-cli tests
Progress toward being able to run integration-cli campaign using a
client hitting a remote host.

Most of these fixes imply flagging tests that assume they are running on
the same host than the Daemon. Also fixes the `contrib/httpserver` image
that couldn't run because of a dynamically linked Go binary inside the
busybox image.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2016-02-11 07:31:49 -08: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
Justas Brazauskas
927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
Wen Cheng Ma
f4abc6406e Using checkers assert for integration-cli/docker_cli_attach_unix_test.go
Fixes part of #16756

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2015-10-29 21:38:00 +08:00
Vincent Demeester
50852f3be3 Fix TestAttachClosedOnContainerStop racey test
This test is failing once in a while on the CI, because the docker
attach command might be called after the container ends.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-29 16:57:58 +02:00
Vincent Demeester
799d9605d6 Remove/Comment time.Sleep in integration tests
Remove what seems unnecessary time.Sleep (1 second even) and comment the
ones that seemed necessary.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-08-18 20:36:08 +02: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
Antonio Murdaca
4203230cbb c.Fatal won't fail and exit test inside a goroutine, errors should be handled outside with a channel
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-29 17:02:22 +02:00
David Mackey
3941623fbc trivial: typo cleanup
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
2015-04-27 13:35:08 -07:00
Alexander Morozov
dc944ea7e4 Use suite for integration-cli
It prints test name and duration for each test.
Also performs deleteAllContainers after each test.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-21 10:28:52 -07:00
bobby abbott
621b601b3c Removed unnecessary error output from dockerCmd
Changed method declaration. Fixed all calls to dockerCmd
method to reflect the change.

resolves #12355

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-04-17 09:11:14 -07:00
Brian Goff
28cda04838 Move TestAttachDetachTruncatedID to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-13 20:48:26 -04:00
Brian Goff
ae0883ce00 Move TestAttachDetach to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-13 20:48:26 -04:00
Brian Goff
475c65319b Remove stripTrailingCharacters from tests
This was just an alias to `strings.TrimSpace`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-06 09:21:18 -04:00
Tibor Vass
a124bfaef3 integration-cli: wait for container before sending ^D
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-01-22 17:28:35 -05:00
Brian Goff
6ef8057700 Fix racey TestAttachAfterDetach
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-21 10:08:37 -05:00
Jessica Frazelle
798215af24 Add build constraint.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 14:40:07 -08:00
Tonis Tiigi
28cf8fddd4 Fix attach stream closing issues
Fixes: #9860
Fixes: detach and attach tty mode

We never actually need to close container `stdin` after `stdout/stderr` finishes. We only need to close the `stdin` goroutine. In some cases this also means closing `stdin` but that is already controlled by the goroutine itself.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-01-14 02:03:25 +02:00