Commit Graph

35 Commits

Author SHA1 Message Date
e7731ac431 Fix TestBuildCancelationKillsSleep to not fail on Windows
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: d38c90140b8330bd355c40a0c8d1e9bd2b3664ec
Component: engine
2015-04-09 21:03:19 +02: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
5897cb3c81 Clean up integration-cli tests
My AR couldn't take it any more:
- one logDone per test
- PASSED lines don't wrap

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 9a9d23dbc40c9b650bd1f9f98a421b7ff2312f36
Component: engine
2015-03-26 17:25:50 -07:00
1e47557825 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: b80fae735684406d848b16a0f148a746e17ed25f
Component: engine
2015-03-24 18:19:59 +01:00
088f0e2cb3 Merge pull request #9774 from pwaller/cancellation
Add basic build cancellation
Upstream-commit: 45ee402a631a59e2a33df7b2f63a49f6f3f84f09
Component: engine
2015-03-22 19:16:23 -07:00
7c1bfa9093 Implement build cancellation
Add the capability to cancel the build by disconnecting the client.

This adds a `cancelled` channel which is used to signal that a build
should halt. The build is halted by sending a Kill signal and noticing
that the cancellation channel is closed.

This first pass implementation does not allow cancellation during a
pull, but that will come in a subsequent PR.

* Add documentation of cancellation to cli and API

* Protect job cancellation with sync.Once

* Add TestBuildCancelationKillsSleep

* Add test case for build cancellation of RUN statements.

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 671c12204cb469d868f646da1474d5bad6541770
Component: engine
2015-03-22 11:31:28 +00:00
bbeee5cd0d Remove debug log line from cgroup-parent feature e2e test.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: a7639c2e1f377b1f5903bb6435473cba4db6522f
Component: engine
2015-03-20 23:25:34 +00:00
2d903c82e5 Merge pull request #10798 from ahmetalpbalkan/win-cli/TestEventsUntag-fix
integration-cli: Remove timeout dependency on TestEventsUntag
Upstream-commit: a8b699f5d9a409702fd85a91f87f05f6bab267ed
Component: engine
2015-03-04 03:54:33 -08:00
c1343f737e Merge pull request #10794 from ahmetalpbalkan/win-cli/TestContainerApi-volume-path-fix
integration-cli: Generate unix-style volume paths for tests
Upstream-commit: 47e9f90be13d901c8fd6dfd0d77ec3f5debecada
Component: engine
2015-02-19 11:28:55 -08:00
fbfe910172 Merge pull request #10806 from ahmetalpbalkan/win-cli/TestSave-fix
integration-cli: use pipes for save/load tests
Upstream-commit: cd9769c55e3c0c405854b84c2c4bd273be79b23d
Component: engine
2015-02-18 22:42:06 -08:00
6e1d109cda integration-cli: use pipes for save/load tests
This removes `bash` dependency from save/load integration tests.
It used to call `/bin/bash -c 'c:\...\docker.exe'` which is not valid.
Also removed usage of tempdirs and temp files for saving/loading
repos. All are now done using in-memory pipes and buffers.

Created `runCommandPipelineWithOutput` helper to replace the
`/bin/bash -c 'a | b | c'` using pipes and returning output from
last command in the pipeline. This makes the code even shorter
and readable.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: b81105eaca56e7b22c97e24b7314419ee0a4f2a9
Component: engine
2015-02-17 17:09:09 -08:00
451dc60394 integration-cli: generate unix-style volume paths
Some tests in `docker_api_containers_test.go` assume the
docker daemon is running at the same machine as the cli
and uses `ioutil.TempDir` to create temp dirs and use them
in the test.

On windows ioutil.TempDir and os.TempDir would create win-style
paths and pass them to daemon. Instead, I hardcoded `/tmp/` and
generate some random path manually and allow daemon to create
the directory.

Fixes tests:
- TestContainerApiStartVolumeBinds
- TestContainerApiStartDupVolumeBinds
- TestVolumesFromHasPriority

Downside:
- Does not clean the temp dirs generated on the remote daemon
  machine unless delete container deletes them.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: df5334183fd681812f0d2cb03600d3eb0f3ef513
Component: engine
2015-02-17 01:29:23 -08:00
4cac2d34df integration-cli: remove timeout dependency on TestEventsUntag
TestEventsUntag requires a `timeout` command which does not
exist on OS X or Windows (in fact, windows has a totally different
timeout program and this test was accidentally using it).

- Created runCommandWithOutputForDuration.
  This entirely replaces runDockerCommandWithTimeout and
  removes dependency to `timeout` command.
- Made runDockerCommandWithTimeout reuse runDockerCommandForDuration.

TestEventsUntag works now on Windows.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 5dbaea1ca99ecb51174259f5ebb814101c349edc
Component: engine
2015-02-14 02:17:42 -08:00
0c27972573 integration-cli: seed rand in makeRandomString
Current uses of `makeRandomString` is to create really
long strings. In #10794, I used them to create nearly-unique
unix paths for the daemon. Although collions are harmless and
don't fail the tests, this prevents the same strings from being
created consistently in every run by seeding rand.Random.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 00cd214afe46e79848e0f807bcdd19c20251cd2f
Component: engine
2015-02-13 23:26:08 -08:00
a01afb0b92 Test for restarting count
This test is for #10058
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 79d30364c95f13b9ff2ce3b4df9bb70d2ddd41f0
Component: engine
2015-01-13 20:28:44 -08:00
e61e114873 Enable test-integration-cli for Windows platform
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f3ed42286e7df3a35ca41a4d19fab2a53a08b382
Component: engine
2014-12-20 16:40:40 -08:00
9442c6a19e Remove unnessary abstraction deepEqual
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: fa753e67ae2bf573c9dfb1da1e1135c5ef5ef415
Component: engine
2014-12-03 17:52:06 -08:00
2a07b18ca1 Remove unnecessary abstraction nLines
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 02a021119fb2b3e051b98817831a8c1a8a9fd464
Component: engine
2014-12-03 17:47:28 -08:00
4cd694cddb cleanup: remove startCommand function, only used once, and
unecessary abstraction.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 7ba9a18ade7393d942d995d34a92d757ef4af0b7
Component: engine
2014-12-03 17:43:26 -08:00
4b66ac1426 Generalize consumeSlow and add stop support
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: 417e48e4a00c891e8fe5614ac6a1ef12de951f72
Component: engine
2014-10-30 21:11:33 +02:00
55acba12a1 Move consumeSlow() under test utils
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: 8a81c462722c7158e481f974f628843e7c172158
Component: engine
2014-10-30 20:55:08 +02:00
bbf89a9e7f Cleanup errorOut remove errorOut functions
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 5af7facf18565100d52fa198a695ab98a9669825
Component: engine
2014-10-16 15:06:20 -07:00
b7f1d56490 Fix Tag Test for longer tags
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: de32f48e6668e9f071272d588cf6acdd7090b9ca
Component: engine
2014-10-07 19:37:08 -07:00
16206f937c integcli: lint fixes
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: c0e632246d821f3f70ffcf7244cf7a9b336b0344
Component: engine
2014-10-06 23:15:17 +03:00
3afe5f7408 integcli: add & use dockerCmdWithTimeout & InDir
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: c6965e3e45cc1c46afc885c57e0e6b9a7769722c
Component: engine
2014-09-22 21:02:51 +03:00
5314f1d0ea integcli: consolidate cmd exit code processing
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 97b50e0f292847a8e3f166aa9386f3e51b1c5e95
Component: engine
2014-09-22 20:32:50 +03:00
18f1860b4a integcli: fix race in runCommandWithStdoutStderr
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: c69896d8a013fca05ffee479e08605552715f901
Component: engine
2014-09-22 17:53:12 +03:00
699424477b integcli: run build tests in tmpdir
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: be924087eb5a2ab0ad79c069782e82805dd31d58
Component: engine
2014-09-17 20:05:33 +03:00
86091bac44 integ-cli: fix TestImportDisplay & add FileServer
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 9e5592d6a10ce02fb77244c7de3fff38958e0b89
Component: engine
2014-09-16 01:54:21 +03:00
71e8f9134d integ-cli: test correct directory permissions
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: cc5fb986b03ce28075a9f3aee248d401f3be0c96
Component: engine
2014-09-08 20:02:40 +03:00
9046d6de2c clean up context on build completion & add test
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 18587469789594f7ca26fc942c6d23b971a14dd3
Component: engine
2014-09-02 17:35:25 +03:00
0ebd331b6f Fix multiple attach test.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 01094c15680c0a33367e1dcc69ec9f4018efd2ac
Component: engine
2014-08-22 03:58:05 -07:00
e695b55f9e integcli: add JSON utils for testing
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: e5e8669c7289959a2634bd3f66f89eef1bd4ef01
Component: engine
2014-07-17 23:11:40 +03:00
42a6758106 Convert a legacy integration test to a clean v2 CLI integration test.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 30f22ee9e3ea1012ca663a0383c8c9c2330c52cc
Component: engine
2014-04-07 20:34:21 +00:00
624997be0f initial version of cli integration tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 6db32fdefdae49843ed9535b3af1099e6bd2755d
Component: engine
2014-03-29 23:09:40 +02:00