Commit Graph

29 Commits

Author SHA1 Message Date
4bffdb208b Fix flaky test of TestRestartStoppedContainer (#21211).
This fix addressed the issue of test TestRestartStoppedContainer
in #21211. Inside the test, a `docker restart` command is
followed by a `docker logs` command. However, `docker restart`
returns immediately so there is no guarantee that `docker logs`
will wait until the restarted container completes the command
`echo foobar`.

This fix use the check of `{{.State.Running}} = false` to make
sure that the restarted container has already finished, before
invoking the `docker logs` command. The timeout is set to 20s
to make sure it passes WindowsTP4 check.

This fixes #21211.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 48ccdd46aea4bb16925d0a333f792a712f1c11dc
Component: engine
2016-03-18 05:50:23 +00:00
f444846f4e integration-cli: remove not necessary -d again
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: e44689139d2ffd08c147ffe940a15a8e8616786a
Component: engine
2016-02-28 13:48:15 +01:00
e682d2e8d7 Windows CI: Port docker_cli_restart_test.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 281c1ced6d6901ffb7faee209c243d0734abc792
Component: engine
2016-02-24 15:21:56 -08:00
8bc92ae008 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>
Upstream-commit: 62a856e9129c9d5cf7db9ea6322c9073d68e3ea4
Component: engine
2016-01-29 23:39:07 +08:00
d22cc489e9 Skip failing tests on ARM to get red/green feedback from Jenkins
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
Upstream-commit: 4f339570cbd3cc57f5410c4ca08c7d7e03e6e56f
Component: engine
2016-01-18 17:00:15 +01:00
ddffdc7130 IT for restart-policy and DNS based SD in user-defined networks
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 7481961009e023a624d053e50f70ff3eb666dd19
Component: engine
2016-01-14 11:03:26 -08:00
22b751507a fix consistetly failing TestContainerRestartSuccess on windows it looks up pids and does unixy things
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: f91115e3a26f612001bde5f55cd59c69f7243104
Component: engine
2015-11-25 13:04:59 -08:00
39092c8452 Adding a restart test to make sure #16887 doesnt happens again
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: be9b7a2459fef01e0f5cd3a8d1ad2dc822a5b1dd
Component: engine
2015-11-18 23:29:25 -08:00
cce8b7e14d use of checkers on docker_cli_restart_test.go
Signed-off-by: weiyan <weiyan3@huawei.com>
Upstream-commit: 196af472a6b423ed0547c0fb080aa548cd077efd
Component: engine
2015-10-15 16:35:03 +08:00
5a36e78a10 Windows: First part of CI tests (docker run)
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8a5ab83df8c029723d92a8b3a602b0d799753807
Component: engine
2015-09-22 10:24:03 -07:00
c03ccb6893 Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f9a3558a9d75ed6a2f9f1b2d80800226afaa74a5
Component: engine
2015-09-04 12:32:40 -07:00
22da8315f6 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>
Upstream-commit: 799d9605d6d37a0f5c559b0325d924ad183ff4ee
Component: engine
2015-08-18 20:36:08 +02:00
2d8d0361a7 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
Upstream-commit: 50d2597e490c4636ee8cacabf34bb9ed3e21d3fc
Component: engine
2015-07-22 09:02:00 +02:00
018c7593fb CI: use dockerCmd in integration-cli when possible
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 012b67c3ea5bff539673deaa7058036126ac1046
Component: engine
2015-07-22 17:55:41 +08:00
b821d19c27 Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1c3cb2d31ea722e2c174bf78eda62fec6949fb8b
Component: engine
2015-07-21 15:33:05 -07:00
f429ebce66 Refactor : Use dockerCmd in integration-cli tests
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 71868228c787f54501abec6556364d2ceaa4e645
Component: engine
2015-07-17 04:07:12 +08:00
4fadb58803 Remove prefix dots from inspects in tests
Dots prepended to key in inspectField function

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 67058e388b596392f7aceb7ecd6b38f6f2ff2de1
Component: engine
2015-07-08 12:41:05 -07:00
9e12a52ca0 Use inspectField to simplify code
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 74f8a4eca4d504867aaea63a35ef1e491d332f74
Component: engine
2015-05-18 10:06:13 +08:00
1884ef3b9b 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>
Upstream-commit: dc944ea7e48d11a2906e751d3e61daf08faee054
Component: engine
2015-04-21 10:28:52 -07:00
ab9a366f0e Remove stripTrailingCharacters from tests
This was just an alias to `strings.TrimSpace`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 475c65319b4663d630711519e18d0b134c42c7f1
Component: engine
2015-04-06 09:21:18 -04:00
6052094333 Verify MaximumRetryCount=0 if the restart policy is always.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: f5310f403da573e28477e142e5f70efe0045b323
Component: engine
2015-03-30 09:08:33 +08:00
aa7fb83cec add TestContainerRestartwithGoodContainer test case
Signed-off-by: s00318865 <sunyuan3@huawei.com>
Upstream-commit: 133983190622bf2618df6c36fb77669e30458e17
Component: engine
2015-03-19 20:20:04 +08:00
0f72ec16db Better test cleanup with defer
This fixes a few misuses of `deleteAllContainers()` cleanup
method in integration-cli suite by moving call to the
beginning of the method and guaranteeing their execution
(including panics) with `defer`s.

Also added some forgotten cleanup calls while I'm at it.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 70407ce40ca98d763da8472e7ee94b6e8d66912d
Component: engine
2015-02-20 14:04:36 -08:00
4cb12b37f1 integration-cli: Fix race in restart loop
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 752a0d6f34ee3c92dc877273c33b8cd0239fda71
Component: engine
2015-01-22 14:06:24 -05:00
e26618d2ee restart: add test for recording restart policy name
Add test for recording restart policy name on
- restart=no
- restart=always
- restart=on-failure

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: c3ed49dcdb2d835bf4fbdebe3f07318c945282c8
Component: engine
2015-01-16 17:58:26 +08:00
c587404dc5 Cleanup errorOut resp restart tests
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 9f52d8e6e786e62aa63b06d26782120fd25daf31
Component: engine
2014-10-16 15:06:20 -07:00
4884c0c1a5 Use prefix naming for restart tests
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 1ddd013b194d7f551547bd2940a92ba3db72f95e
Component: engine
2014-09-19 22:11:54 +04:00
39b46f69f1 fix docker integration-cli restart test race
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 5931669343f568114cb209dabf8913be44cd63e8
Component: engine
2014-07-28 23:46:14 -07:00
8ae73ea011 Move docker restart tests to integration cli
Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: 9da6c80533f80060575840e1e2fd80cc11826f7b
Component: engine
2014-07-02 21:56:19 +01:00