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

11 commits

Author SHA1 Message Date
Daniel Nephin
00d409f03e Migrate some copy tests to integration
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-27 16:48:35 -05:00
Daniel Nephin
1a03bd396b Remove a test that was moved to docker/cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-10-30 18:39:11 -04:00
Brian Goff
ebcb7d6b40 Remove string checking in API error handling
Use strongly typed errors to set HTTP status codes.
Error interfaces are defined in the api/errors package and errors
returned from controllers are checked against these interfaces.

Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the
line of causes one of the interfaces is implemented. The special error
interfaces take precedence over Causer, meaning if both Causer and one
of the new error interfaces are implemented, the Causer is not
traversed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-15 16:01:11 -04:00
Erik Hollensbe
8a7ff5ff74 daemon/archive.go: Fix copy routines to preserve UID.
This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2017-04-12 10:33:19 +00:00
Vincent Demeester
33968e6c7d
Remove pkg/integration and move it to testutil or integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-30 18:26:34 +01:00
John Howard
088c3eeea8 Windows: Enable some cp integration tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 14:32:10 -07:00
Jian Zhang
f26a31e80c Use checker assert for integration-cli/docker_cli_cp_* four files.
Signed-off-by: Jian Zhang <zhangjian.fnst@cn.fujitsu.com>
2015-10-26 10:22:28 +08:00
John Howard
f9a3558a9d Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-04 12:32:40 -07:00
Josh Hawn
75f6929b44 Fix docker cp Behavior With Symlinks
[pkg/archive] Update archive/copy path handling

  - Remove unused TarOptions.Name field.
  - Add new TarOptions.RebaseNames field.
  - Update some of the logic around path dir/base splitting.
  - Update some of the logic behind archive entry name rebasing.

[api/types] Add LinkTarget field to PathStat

[daemon] Fix stat, archive, extract of symlinks

  These operations *should* resolve symlinks that are in the path but if the
  resource itself is a symlink then it *should not* be resolved. This patch
  puts this logic into a common function `resolvePath` which resolves symlinks
  of the path's dir in scope of the container rootfs but does not resolve the
  final element of the path. Now archive, extract, and stat operations will
  return symlinks if the path is indeed a symlink.

[api/client] Update cp path hanling

[docs/reference/api] Update description of stat

  Add the linkTarget field to the header of the archive endpoint.
  Remove path field.

[integration-cli] Fix/Add cp symlink test cases

  Copying a symlink should do just that: copy the symlink NOT
  copy the target of the symlink. Also, the resulting file from
  the copy should have the name of the symlink NOT the name of
  the target file.

  Copying to a symlink should copy to the symlink target and not
  modify the symlink itself.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-30 12:14:28 -07:00
Vincent Batts
7b4e6fc47b *: s/direcotry/directory/g typo
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-07-27 11:29:28 -04:00
Josh Hawn
418135e7ea integration-cli: New docker cp integration tests
Adds several integration tests for `docker cp` behavior with over a dozen
tests for each of:

  container -> local
  local -> container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-21 15:19:52 -07:00