Merge pull request #39688 from Snorch/skip-windows-specific-isolation-requirements-on-non-windows

integration-cli/requirements: Skip windows specific isolation require…
This commit is contained in:
Sebastiaan van Stijn 2019-09-16 11:29:24 +02:00 committed by GitHub
commit 2e7d48f2db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -166,10 +166,13 @@ func (s *DockerSuite) TestRestartContainerwithGoodContainer(c *testing.T) {
}
func (s *DockerSuite) TestRestartContainerSuccess(c *testing.T) {
testRequires(c, testEnv.IsLocalDaemon)
// Skipped for Hyper-V isolated containers. Test is currently written
// such that it assumes there is a host process to kill. In Hyper-V
// containers, the process is inside the utility VM, not on the host.
testRequires(c, testEnv.IsLocalDaemon, IsolationIsProcess)
if DaemonIsWindows() {
testRequires(c, IsolationIsProcess)
}
out := runSleepingContainer(c, "-d", "--restart=always")
id := strings.TrimSpace(out)
@ -239,10 +242,13 @@ func (s *DockerSuite) TestRestartWithPolicyUserDefinedNetwork(c *testing.T) {
}
func (s *DockerSuite) TestRestartPolicyAfterRestart(c *testing.T) {
testRequires(c, testEnv.IsLocalDaemon)
// Skipped for Hyper-V isolated containers. Test is currently written
// such that it assumes there is a host process to kill. In Hyper-V
// containers, the process is inside the utility VM, not on the host.
testRequires(c, testEnv.IsLocalDaemon, IsolationIsProcess)
if DaemonIsWindows() {
testRequires(c, IsolationIsProcess)
}
out := runSleepingContainer(c, "-d", "--restart=always")
id := strings.TrimSpace(out)

View file

@ -4227,7 +4227,7 @@ func (s *DockerSuite) TestRunWindowsWithCPUPercent(c *testing.T) {
}
func (s *DockerSuite) TestRunProcessIsolationWithCPUCountCPUSharesAndCPUPercent(c *testing.T) {
testRequires(c, DaemonIsWindows, IsolationIsProcess)
testRequires(c, IsolationIsProcess)
out, _ := dockerCmd(c, "run", "--cpu-count=1", "--cpu-shares=1000", "--cpu-percent=80", "--name", "test", "busybox", "echo", "testing")
assert.Assert(c, strings.Contains(strings.TrimSpace(out), "WARNING: Conflicting options: CPU count takes priority over CPU shares on Windows Server Containers. CPU shares discarded"))
@ -4244,7 +4244,7 @@ func (s *DockerSuite) TestRunProcessIsolationWithCPUCountCPUSharesAndCPUPercent(
}
func (s *DockerSuite) TestRunHypervIsolationWithCPUCountCPUSharesAndCPUPercent(c *testing.T) {
testRequires(c, DaemonIsWindows, IsolationIsHyperv)
testRequires(c, IsolationIsHyperv)
out, _ := dockerCmd(c, "run", "--cpu-count=1", "--cpu-shares=1000", "--cpu-percent=80", "--name", "test", "busybox", "echo", "testing")
assert.Assert(c, strings.Contains(strings.TrimSpace(out), "testing"))