New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integ-cli: Fix path issues in docker cp tests #10875

Merged
merged 1 commit into from Feb 19, 2015

Conversation

Projects
None yet
6 participants
@ahmetb
Contributor

ahmetb commented Feb 18, 2015

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
cc: @cyphar @unclejack @duglin @jfrazelle @tianon

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>
@ahmetb

This comment has been minimized.

Contributor

ahmetb commented Feb 18, 2015

https://jenkins.dockerproject.com/job/Windows-PRs/56/console

=== RUN TestCpGarbagePath
[PASSED]: cp - garbage paths relative to container's rootfs
--- PASS: TestCpGarbagePath (1.10s)
=== RUN TestCpRelativePath
[PASSED]: cp - relative paths relative to container's rootfs
--- PASS: TestCpRelativePath (1.16s)
[...]
=== RUN TestCpAbsoluteSymlink
[PASSED]: cp - absolute symlink relative to container's rootfs
--- PASS: TestCpAbsoluteSymlink (1.12s)
=== RUN TestCpSymlinkComponent
[PASSED]: cp - symlink path components relative to container's rootfs
--- PASS: TestCpSymlinkComponent (1.14s)

👍 happy CI is happy.

@duglin

This comment has been minimized.

Contributor

duglin commented Feb 18, 2015

LGTM

@cyphar

This comment has been minimized.

Contributor

cyphar commented Feb 18, 2015

IANAM, but yeah it should've used path from the outset. +1

@jessfraz

This comment has been minimized.

Contributor

jessfraz commented Feb 19, 2015

LGTM

@jessfraz

This comment has been minimized.

Contributor

jessfraz commented Feb 19, 2015

thanks @cyphar we always value your opinion :)

jessfraz pushed a commit that referenced this pull request Feb 19, 2015

Jessie Frazelle
Merge pull request #10875 from ahmetalpbalkan/win-cli/TestCp
integ-cli: Fix path issues in docker cp tests

@jessfraz jessfraz merged commit 5456ad2 into moby:master Feb 19, 2015

1 of 2 checks passed

windows Jenkins build Windows-PRs 56 has failed
Details
janky Jenkins build Docker-PRs 1296 has succeeded
Details

@ahmetb ahmetb deleted the ahmetb:win-cli/TestCp branch Feb 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment