Commit Graph

867 Commits

Author SHA1 Message Date
f8b58965ad integ-cli: Skip some exec tests requiring same-host daemon
This skips tests:
- `TestRunExecDir`
- `TestRunMutableNetworkFiles`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: e6f88f091d59a32f7a1cd9baa18b9d792548f36d
Component: engine
2015-02-24 16:39:42 -08:00
735ebac419 Merge pull request #10995 from ahmetalpbalkan/win-cli/SameHostDaemon-skips-2
integ-cli: Skip new tests requiring same-host daemon
Upstream-commit: 1060a5334efac1b478ed7b61fa0d4fb8dc184ff0
Component: engine
2015-02-24 16:36:11 -08:00
2792d90e6f integ-cli: Skip new tests requiring same-host daemon
This skips tests:
- `TestExecAfterContainerRestart`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: cfc8372c0a610ab87fed92f6ba6dd4100fef26d8
Component: engine
2015-02-24 16:30:22 -08:00
b3b00f07f4 integ-cli: remove bash dependency from TestSaveDirectoryPermissions
Use the new `runCommandPipelineWithOutput` helper to
remove bash dependency required for piping in
`TestSaveDirectoryPermissions`.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: c3e28351a1547f4999aafb0780e4b1a5d84d78ac
Component: engine
2015-02-24 15:52:06 -08:00
6fdd96a789 Merge pull request #10989 from ahmetalpbalkan/win-cli/TestCliProxyProxyTCPSock-skip
integ-cli: skip TestCliProxyProxyTCPSock on remote daemon
Upstream-commit: 11717741fd31cf9e27a07138dfb998f7aed9da4f
Component: engine
2015-02-24 15:47:46 -08:00
d775414696 Merge pull request #10837 from ahmetalpbalkan/win-cli/readContainerFile-with-exec
integration-cli: readContainerFileWithExec for links tests
Upstream-commit: 435d654b093e8662ab8c9f82fe4321dcad81c289
Component: engine
2015-02-24 15:24:48 -08:00
de2c651b17 Merge pull request #9123 from rhatdan/commit-change
Patch to commit-change patch to add docker import support
Upstream-commit: e7dc7a63423911430512bb5ecf693d58de459b40
Component: engine
2015-02-24 17:09:10 -05:00
c1ee38da67 Merge pull request #10935 from coolljt0725/fix_commit
Fix docker commit make a paused container to unpaused
Upstream-commit: bd95269fb917850fcfe8951135a61eb7398bcc71
Component: engine
2015-02-24 13:28:32 -08:00
31a690e69b integ-cli: skip TestCliProxyProxyTCPSock on remote daemon
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 6a9edfdc3b8ef4ed6febe8cee13dfd6786541b3b
Component: engine
2015-02-24 12:04:33 -08:00
d5ee9d6913 Remove leftover debugging artifact in test
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: e9e993922d3173a292d4caaf35cb913ddc494f0c
Component: engine
2015-02-24 11:44:14 -08:00
a3a5e74642 I am only seeing the values I set
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 4a9fa9650b154e70d55f750c3674c2d6dd390bef
Component: engine
2015-02-24 13:01:36 -05:00
4e766f5eaa pass --change changes to the import job
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 17abfc3ddc79592753289a8556a343e276fb15b5
Component: engine
2015-02-24 13:01:36 -05:00
22d99ec297 support changes in commit job
In addition to config env, `commit` now will also accepts a `changes` env which
is a string contains new-line separated Dockerfile instructions.
`commit` will evaluate `changes` into `runconfig.Config` and merge it with
`config` env, and then finally commit a new image with the changed config

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: rhatdan)
Upstream-commit: b30257ccf96f646c6b008312d39544d6700f5cb1
Component: engine
2015-02-24 13:01:35 -05:00
8e37315c55 Fix docker commit make a paused container to unpaused. Closes #10932
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 7c7c7f84dcc985dfac5aac5004d39d15e35f7812
Component: engine
2015-02-24 03:28:40 -08:00
f3462cd410 Merge pull request #10933 from ahmetalpbalkan/version-daemon-os-arch
cli: Add server OS/Arch info to 'version' cmd
Upstream-commit: 02c888159666ee53df9eeb1397c7d597dabf3b60
Component: engine
2015-02-23 15:26:53 -08:00
10829092be Merge pull request #10908 from duglin/EnvDollarTest
Add a ENV tests with special chars in the values
Upstream-commit: fd185eddf625e810f6cb707df9297e4dfd70b7d0
Component: engine
2015-02-23 15:25:31 -08:00
e430471f3b Merge pull request #10921 from duglin/FixNonverboseBuild
Build w/o verbose hangs w/RUN
Upstream-commit: ac06d0c46a26192c34a3ed782514652895fe5447
Component: engine
2015-02-23 15:15:12 -08:00
4fbdef753d cli: Add server OS/Arch info to 'version' cmd
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 3346c2e4d9ce0cf92b056b6ddc883adf5b8beddd
Component: engine
2015-02-23 14:32:25 -08:00
f24c530c74 integ-cli: Skip tests assuming daemon/cli are on the same host
Some integration-cli tests assume daemon and cli are running
on the same machine and therefore they examine side effects
of executed docker commands on docker host by reading files
or running other sort of commands.

In case of windows/darwin CLI tests these provide little
or no value and should be OK to skip.

List of skipped tests:
- `TestContainerNetworkMode`
- `TestCpVolumePath`
- `TestCreateVolumesCreated`
- `TestBuildContextCleanup`
- `TestBuildContextCleanupFailedBuild`
- `TestLinksEtcHostsContentMatch`
- `TestRmContainerWithRemovedVolume`
- `TestRunModeIpcHost`
- `TestRunModeIpcContainer`
- `TestRunModePidHost`
- `TestRunNetHost`
- `TestRunDeallocatePortOnMissingIptablesRule`
- `TestRunPortInUse`
- `TestRunPortProxy`
- `TestRunMountOrdering`
- `TestRunModeHostname`
- `TestRunDnsDefaultOptions`
- `TestRunDnsOptionsBasedOnHostResolvConf`
- `TestRunResolvconfUpdater`
- `TestRunVolumesNotRecreatedOnStart`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: b686b65c9b5f5eabc7a618faf0055aff06e4c0c4
Component: engine
2015-02-23 14:08:05 -08:00
ded807afc8 Add a ENV tests with special chars in the values
Tests a little bit of escaping quotes too

See https://github.com/docker/docker/pull/10431#issuecomment-75163177

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ed3bc3b9864dff42a7949aa9202ea242e9ed0a9b
Component: engine
2015-02-23 11:31:38 -08:00
888a374311 integration-cli: add test requirement ExecSupport
Skip tests based on remote daemon's exec support (to exclude
these tests from `make test` ran in LXC case). Makes use of
`test_no_exec` build tag passed by build scripts.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 102e0611475c7267dd4d2a87044fcc40b2eddcc0
Component: engine
2015-02-20 23:24:30 -08:00
5db21189fd readContainerFileWithExec for links tests
Shout out to @estesp for the idea. Some use cases of
`readContainerFile` can be replaced with `docker exec $id cat $file`.
This helper method can eliminate the requirement that
host/cli should be on the same machine.

TestRunMutableNetworkFiles and TestRunResolvconfUpdater still
need to access the docker host filesystem as they modify
the file directly from there assuming cli and daemon are
on the same machine.

This fixes TestLinksUpdateOnRestart and TestLinksHostsFilesInject
for Windows CI.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 6bbb456138e48c7558cfe5c797c57d136f1a694b
Component: engine
2015-02-20 23:14:38 -08:00
113975c3ee Merge pull request #10909 from ahmetalpbalkan/run_test-defer
integration-cli: Better test cleanup with defer
Upstream-commit: b062ef05e59ecfc0c08dccdea3d81c024c491350
Component: engine
2015-02-20 17:28:08 -08:00
7e28069bae Merge pull request #10871 from ahmetalpbalkan/win-cli/TestBuildAddBadLinks-fix
integ-cli: Fix TestBuildAddBadLinks for windows
Upstream-commit: 4ba1128c1857e8c8d3dbbee63b50b600a2d9aed7
Component: engine
2015-02-20 17:27:36 -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
fed3219626 Build w/o verbose hangs w/RUN
`docker build -q .` where Dockerfile contains a RUN cmd will hang on the
RUN. It waits for the output stream to close but because of -q we never
attached to the container and end up waiting forever.

The fact that no one noticed this tells me that people may not actually
use -q and if so I wonder if it would make sense to make -q work the may
it does for other commands (like `docker ps`) and make it so it only
shows the container ID at the end.  A -q/quiet option that only hides the
container RUN output apparently isn't really that useful since no one is
using it.  See: https://github.com/docker/docker/issues/4094

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 92c353582c210ebc351f7f5911273af76398a2a8
Component: engine
2015-02-20 13:38:03 -08:00
1269363ae7 integ-cli: Fix TestBuildAddBadLinks for windows
TestBuildAddBadLinks used to build a path by
concenating unix-style forward slashes. Fixed that
by providing a windows-equivalent using `runtime.GOOS`.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: d0dc14e5d6fe5f8ef9d4a8a8dc95fa087439a5b4
Component: engine
2015-02-20 13:24:59 -08:00
89b66e14e3 integration-cli: pass platform-compatible paths to os.Symlink
Although this doesn't fix the test (os.Symlink is not yet
implemented for Windows), this prevents unix-style paths
from being passed to os.Symlink. Also makes code cleaner
for linux.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 4581240e585d5188955507fbd1de1affcd2ffc1b
Component: engine
2015-02-20 12:25:10 -08:00
868befad3f Merge pull request #10913 from ahmetalpbalkan/win-cli/UnixSpecific-skip
integ-cli: Skip some unix-specific cli tests
Upstream-commit: 695bf3348f022e12c2d7deb21f8f3a088c079e89
Component: engine
2015-02-20 10:33:28 -08:00
340738a112 Merge pull request #10914 from kargakis/map-commands
Map Commands instead of using them as a slice
Upstream-commit: c5aca86654f9eeb07e533ece53da139aad692b2b
Component: engine
2015-02-20 10:32:04 -08:00
b51836333b Merge pull request #10625 from duglin/FixHelpHomeSlash
Fix for help when $HOME is /
Upstream-commit: fdfa7ee70286c3d08a839e20ea7663185cdbcd78
Component: engine
2015-02-20 10:06:22 -08:00
117a5aaace integ-cli: Typo fix in test_vars_* comments.
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: 5d615dff10f31ea6bf77a1233b1821b0e525e456
Component: engine
2015-02-20 09:51:10 -08:00
105231e146 integ-cli: Skip some unix-specific cli tests
Skipping some of the tests closely tied to running in a
unix environment. Windows does not support chmod/chown
and this causes some tests to fail creating desired
behavior.

- `TestBuildWithInaccessibleFilesInContext`: uses chown/chmod
- `TestBuildDockerfileOutsideContext`: uses os.Symlink, not implemented on
  windows
- `TestCpUnprivilegedUser`: uses chmod, and requires 'unprivilegeduser'
  created by Dockerfile (and thus requires to run inside container)
- `TestBuildChownSingleFile`: uses chown

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 492a58f05fe026653e27ed75d3ad4221f2e615b1
Component: engine
2015-02-20 09:51:10 -08:00
314f2be995 Map Commands instead of using them as a slice
The most obvious use case is when one wants to make sure as fast
as possible that a command is a valid Dockerfile command.

Signed-off-by: kargakis <kargakis@users.noreply.github.com>
Upstream-commit: 6ecf23861ec7036aa4210fe6d3b7dbfaaedbd6d0
Component: engine
2015-02-20 15:56:21 +01:00
1b9876efb2 integ-cli: fix volume test by passing unix path as volume
This fixes `TestVolumesNoCopyData` for test execution on
windows by passing a unix-style path as volume even though
it's running on windows.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 606283875616bf71af4814fc47ee5c2ca7b729c6
Component: engine
2015-02-20 00:58:44 -08:00
efffe9523d Fix for help when $HOME is /
estesp noticed that when $HOME is / the ~ substitutions messes up
becuase it tries to replace all paths that start with "/" with "~".
This fixes it so that it will only replace it when $HOME isn't "/".

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 116367eb07351125754aef01f7d3da152b018710
Component: engine
2015-02-19 22:21:17 -08:00
c61c12bda0 Merge pull request #10873 from ahmetalpbalkan/win-cli/TestBuildRenamedDockerfile-fix
integration-cli: Fix path problems in TestBuildRenamedDockerfile
Upstream-commit: e22487db370e431016b53b4044e452856ac72d10
Component: engine
2015-02-19 16:40:15 -08:00
2c330e66cf Merge pull request #10856 from coolljt0725/fix_expose
Fix docker run --expose with an invalid port does not error out
Upstream-commit: 140293734736e9b7ab61bf4dbb25bc318d6d1c7f
Component: engine
2015-02-19 16:01:15 -08:00
884ae09296 fix race in events test
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 27c61c39db414dd717aea04fc9440ee6d02b626d
Component: engine
2015-02-19 15:32:00 -08:00
a1eb08d949 Add a test for expose a invalid port
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 34b7c10e3eed8bd4d71b998d06ca10766ce4c754
Component: engine
2015-02-19 15:18:13 -08:00
d5362cffa1 Merge pull request #10468 from noironetworks/10457-Pause-and-unpause-accept-multi-containers
Allow docker pause and unpause to accept multiple containers
Upstream-commit: 934535db9c78b20481c8ccabdf174926c6e04d4d
Component: engine
2015-02-19 15:16:05 -08:00
0aa0a22313 integ-cli: Fix path problems in TestBuildRenamedDockerfile
`TestBuildRenamedDockerfile` tests hard-code unix-style
path building. Made use of `path/filepath` to make these
tests work on Windows as well.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 967d85a28fa1e9a8ac4d668960bca8760af2b722
Component: engine
2015-02-19 14:45:26 -08:00
0385663f68 Merge pull request #10818 from estesp/link-add-aliases
Upstream-commit: 356fe89d2431bd54f38b3477aa91ef276f65ffb7
Component: engine
2015-02-19 17:22:53 -05:00
c4aef2a226 Add linked container's name and hostname as aliases to /etc/hosts
Currently when containers are linked the alias name (e.g. from `--link
name:alias`) is added to the parent container's `/etc/hosts` with a
reference to the IP of the linked container.  Some software requires
using the official hostname or node name in operations that need to
match on those values, and it is therefore helpful if the parent
container can refer to the child/link using those same values and still
access the same IP.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 16aa64dc82b6434ec78878fa35eb96e4983b46f8
Component: engine
2015-02-19 14:19:38 -08:00
320f4e4af1 Merge pull request #10852 from Snorch/check-docker-port-is-not-empty
Upstream-commit: ac7bef5e66aa55acc232826ab590149f8e162ad9
Component: engine
2015-02-19 17:18:36 -05:00
1a772e99d8 Merge pull request #10555 from duglin/MoreRenamedDockerfileTests
Add more tests around using -f Dockerfile via the CLI
Upstream-commit: 7829e7b40fafdc6bbe4489cf91a01fbf381c73b9
Component: engine
2015-02-19 13:59:35 -08:00
0846fa52ae Merge pull request #10797 from tianon/strict-test-environment
Upstream-commit: d562f94d473a07c3bee84e66dd9cbf60c04ea7fe
Component: engine
2015-02-19 16:14:05 -05:00
b3d291c64f Merge pull request #10835 from jfrazelle/port-ranges
Upstream-commit: 1875cc2ef42787375055710fc6b359ca3dd85752
Component: engine
2015-02-19 16:11:59 -05:00
7eeecba437 Merge pull request #10619 from bcicen/add-logpath-to-inspect-container
Add logpath to inspect container
Upstream-commit: dc37358d8c9b177a050620731cf3b7f247a26f78
Component: engine
2015-02-19 12:56:45 -08:00
ae2aead6a0 Merge pull request #10819 from jsdir/10815-relative-path-fix
Fixed relative filepath check
Upstream-commit: 08544a89ebdb781234fd559230c5cde30da4503b
Component: engine
2015-02-19 12:54:44 -08:00