Skip to content

Commit 2e7d48f

Browse files
authored
Merge pull request moby#39688 from Snorch/skip-windows-specific-isolation-requirements-on-non-windows
integration-cli/requirements: Skip windows specific isolation require…
2 parents 4b0371f + b469933 commit 2e7d48f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

integration-cli/docker_cli_restart_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,13 @@ func (s *DockerSuite) TestRestartContainerwithGoodContainer(c *testing.T) {
166166
}
167167

168168
func (s *DockerSuite) TestRestartContainerSuccess(c *testing.T) {
169+
testRequires(c, testEnv.IsLocalDaemon)
169170
// Skipped for Hyper-V isolated containers. Test is currently written
170171
// such that it assumes there is a host process to kill. In Hyper-V
171172
// containers, the process is inside the utility VM, not on the host.
172-
testRequires(c, testEnv.IsLocalDaemon, IsolationIsProcess)
173+
if DaemonIsWindows() {
174+
testRequires(c, IsolationIsProcess)
175+
}
173176

174177
out := runSleepingContainer(c, "-d", "--restart=always")
175178
id := strings.TrimSpace(out)
@@ -239,10 +242,13 @@ func (s *DockerSuite) TestRestartWithPolicyUserDefinedNetwork(c *testing.T) {
239242
}
240243

241244
func (s *DockerSuite) TestRestartPolicyAfterRestart(c *testing.T) {
245+
testRequires(c, testEnv.IsLocalDaemon)
242246
// Skipped for Hyper-V isolated containers. Test is currently written
243247
// such that it assumes there is a host process to kill. In Hyper-V
244248
// containers, the process is inside the utility VM, not on the host.
245-
testRequires(c, testEnv.IsLocalDaemon, IsolationIsProcess)
249+
if DaemonIsWindows() {
250+
testRequires(c, IsolationIsProcess)
251+
}
246252

247253
out := runSleepingContainer(c, "-d", "--restart=always")
248254
id := strings.TrimSpace(out)

integration-cli/docker_cli_run_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4227,7 +4227,7 @@ func (s *DockerSuite) TestRunWindowsWithCPUPercent(c *testing.T) {
42274227
}
42284228

42294229
func (s *DockerSuite) TestRunProcessIsolationWithCPUCountCPUSharesAndCPUPercent(c *testing.T) {
4230-
testRequires(c, DaemonIsWindows, IsolationIsProcess)
4230+
testRequires(c, IsolationIsProcess)
42314231

42324232
out, _ := dockerCmd(c, "run", "--cpu-count=1", "--cpu-shares=1000", "--cpu-percent=80", "--name", "test", "busybox", "echo", "testing")
42334233
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(
42444244
}
42454245

42464246
func (s *DockerSuite) TestRunHypervIsolationWithCPUCountCPUSharesAndCPUPercent(c *testing.T) {
4247-
testRequires(c, DaemonIsWindows, IsolationIsHyperv)
4247+
testRequires(c, IsolationIsHyperv)
42484248

42494249
out, _ := dockerCmd(c, "run", "--cpu-count=1", "--cpu-shares=1000", "--cpu-percent=80", "--name", "test", "busybox", "echo", "testing")
42504250
assert.Assert(c, strings.Contains(strings.TrimSpace(out), "testing"))

0 commit comments

Comments
 (0)