Skip to content
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: Skip some unix-specific cli tests #10913

Merged
merged 2 commits into from Feb 20, 2015
Merged

integ-cli: Skip some unix-specific cli tests #10913

merged 2 commits into from Feb 20, 2015

Conversation

@ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Feb 20, 2015

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

I wonder if I can write windows equivalents of those using golang
pkg/os calls for windows. Most of them are not implemented, especially
windows-specific security ACLs etc.

Signed-off-by: Ahmet Alp Balkan ahmetalpbalkan@gmail.com
cc: @unclejack @tianon @jfrazelle @icecrime @tiborvass


const (
// idetifies if test suite is running on a unix platform
isUnixCli = false
Copy link
Contributor

@LK4D4 LK4D4 Feb 20, 2015

Hmm, seems like it can be just isUnix?

Copy link
Contributor Author

@ahmetb ahmetb Feb 20, 2015

Being more explicit never hurts, does it? :-)

Copy link
Contributor Author

@ahmetb ahmetb Feb 20, 2015

Also at some point I can see us running against windows daemon, so isUnix would probably get refactored to this anyway to clarify what it actually refers to.

Copy link
Contributor

@LK4D4 LK4D4 Feb 20, 2015

Was pretty implicit for me actually :P But now I got idea.

@LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented Feb 20, 2015

LGTM

@ahmetb
Copy link
Contributor Author

@ahmetb ahmetb commented Feb 20, 2015

@LK4D4 you made me notice a typo. Can you please re-LGTM? :)

@@ -17,6 +17,10 @@ var (
func() bool { return isLocalDaemon },
"Test requires docker daemon to runs on the same machine as CLI",
}
UnixCli = TestRequirement{
func() bool { return isLocalDaemon },
Copy link
Contributor

@LK4D4 LK4D4 Feb 20, 2015

hmmmm isLocalDaemon?

Copy link
Contributor Author

@ahmetb ahmetb Feb 20, 2015

damn. copypasta is evil.

ahmetb and others added 2 commits Feb 20, 2015
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>
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
@LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented Feb 20, 2015

LGTM

@jessfraz
Copy link
Contributor

@jessfraz jessfraz commented Feb 20, 2015

lgtm

jessfraz pushed a commit that referenced this issue Feb 20, 2015
integ-cli: Skip some unix-specific cli tests
@jessfraz jessfraz merged commit 695bf33 into moby:master Feb 20, 2015
1 check passed
@ahmetb ahmetb deleted the win-cli/UnixSpecific-skip branch Feb 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants