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

21 commits

Author SHA1 Message Date
Alexander Morozov
2029257e3c Merge pull request #13493 from jlhawn/volume_unmount_fix
Fix container unmount networkMounts
2015-05-27 08:44:11 -07:00
Josh Hawn
04f99a6ca8 Fix container unmount networkMounts
UnmountVolumes used to also unmount 'specialMounts' but it no longer does after
a recent refactor of volumes. This patch corrects this behavior to include
unmounting of `networkMounts` which replaces `specialMounts` (now dead code).

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-05-26 17:38:26 -07:00
Brian Goff
f8628ba891 Cleanup container rm funcs
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-05-26 15:38:52 -04:00
Vincent Demeester
c5ef2901d8 delete "defer deleteContainer" on tests
Since docker test suite is now using gocheck, ``defer
deleteContainer(…)`` is not needed anymore.

Fixes #12705

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-04-23 22:27:46 +02: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
Chen Hanxiao
5037297388 cp: add support for copy filename with ":"
We use ":" as separator CONTAINER:PATH.
This patch enables copy filename with ":"
to host.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-04-10 00:08:05 -04:00
Jessica Frazelle
255b84444a cleanup/fix integration-cli for overlay in overlay
Signed-off-by: Jessica Frazelle <jess@docker.com>
2015-04-08 16:59:36 -07: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
Vincent Demeester
8bc330d863 Docker cp handles resolv.conf, hostname & hosts, fixes #9998
Add a integration test TestCpSpecialFiles

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-03-29 22:10:14 +02:00
Doug Davis
f3d96e81e9 Add support for 'docker cp' to write to stdout
Closes #10805

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-05 15:22:08 -08:00
Ahmet Alp Balkan
b686b65c9b 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>
2015-02-23 14:08:05 -08:00
Ahmet Alp Balkan
492a58f05f 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>
2015-02-20 09:51:10 -08:00
Ahmet Alp Balkan
c5b312dcf5 integ-cli: Fix path issues in docker cp tests
Some of the `docker cp` tests were using `path/filepath` to
craft unix paths. This wouldn't work on Windows since filepath
is platform-dependent.

Moved code to `path` as much as possible and hacked away some
`path/filepath` functionality that doesn't exist in `path` pkg.

This fixes the following test cases:
- `TestCpGarbagePath`
- `TestCpRelativePath`
- `TestCpAbsoluteSymlink`
- `TestCpSymlinkComponent`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-18 02:27:44 -08:00
Jessica Frazelle
4ee3a318a1 Run 'go vet' on integration-cli.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-12-03 18:45:51 -08:00
Alexandr Morozov
be5bfbe221 Change path breakout detection logic in archive package
Fixes #9375

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-28 09:44:47 -08:00
Daehyeok Mun
7fbbd515b1 remove deprecated cmd function in integration-cli
Remove deprecated cmd function in integration-cli
and change cmd to dockerCmd in all test files

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2014-11-25 00:32:38 +09:00
Brian Goff
ef98fe0763 Make container.Copy support volumes
Fixes #1992

Right now when you `docker cp` a path which is in a volume, the cp
itself works, however you end up getting files that are in the
container's fs rather than the files in the volume (which is not in the
container's fs).
This makes it so when you `docker cp` a path that is in a volume it
follows the volume to the real path on the host.

archive.go has been modified so that when you do `docker cp mydata:/foo
.`, and /foo is the volume, the outputed folder is called "foo" instead
of the volume ID (because we are telling it to tar up
`/var/lib/docker/vfs/dir/<some id>` and not "foo", but the user would be
expecting "foo", not the ID

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-10-20 20:23:01 -04:00
cyphar
ff24a32876 integration-cli: cp: added symlink-related tests
This patch adds cli integration tests for #5619, which are tests
to ensure that symlinks are kept relative to the container rootfs
(even when a path component).

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-05-24 11:01:20 +10:00
Victor Vieux
5eef0a28cb add test
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-05-21 00:10:07 +00:00
cyphar
79ca77f3e8 integration-cli: cp: added tests for cp
This patch adds integration tests for the copying of resources
from a container, to ensure that regressions in the security of
resource copying can be easily discovered.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-05-14 11:14:59 +10:00