After the commit faaffd5d6d7f ("Windows:Disable 2 restart test when
Hyper-V") some tests became skipped on linux:
SKIP: docker_cli_restart_test.go:167: DockerSuite.TestRestartContainerSuccess (unmatched requirement IsolationIsProcess)
SKIP: docker_cli_restart_test.go:240: DockerSuite.TestRestartPolicyAfterRestart (unmatched requirement IsolationIsProcess)
But AFAIU it is highly unlikely that we actually meant to skip them on linux.
https://github.com/moby/moby/issues/39625
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
(cherry picked from commit b469933b063169718987865b8b1215cb7befd1a6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -166,10 +166,13 @@ func (s *DockerSuite) TestRestartContainerwithGoodContainer(c *testing.T) {
|
| 166 | 166 |
} |
| 167 | 167 |
|
| 168 | 168 |
func (s *DockerSuite) TestRestartContainerSuccess(c *testing.T) {
|
| 169 |
+ testRequires(c, testEnv.IsLocalDaemon) |
|
| 169 | 170 |
// Skipped for Hyper-V isolated containers. Test is currently written |
| 170 | 171 |
// such that it assumes there is a host process to kill. In Hyper-V |
| 171 | 172 |
// 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 |
+ } |
|
| 173 | 176 |
|
| 174 | 177 |
out := runSleepingContainer(c, "-d", "--restart=always") |
| 175 | 178 |
id := strings.TrimSpace(out) |
| ... | ... |
@@ -239,10 +242,13 @@ func (s *DockerSuite) TestRestartWithPolicyUserDefinedNetwork(c *testing.T) {
|
| 239 | 239 |
} |
| 240 | 240 |
|
| 241 | 241 |
func (s *DockerSuite) TestRestartPolicyAfterRestart(c *testing.T) {
|
| 242 |
+ testRequires(c, testEnv.IsLocalDaemon) |
|
| 242 | 243 |
// Skipped for Hyper-V isolated containers. Test is currently written |
| 243 | 244 |
// such that it assumes there is a host process to kill. In Hyper-V |
| 244 | 245 |
// containers, the process is inside the utility VM, not on the host. |
| 245 |
- testRequires(c, testEnv.IsLocalDaemon, IsolationIsProcess) |
|
| 246 |
+ if DaemonIsWindows() {
|
|
| 247 |
+ testRequires(c, IsolationIsProcess) |
|
| 248 |
+ } |
|
| 246 | 249 |
|
| 247 | 250 |
out := runSleepingContainer(c, "-d", "--restart=always") |
| 248 | 251 |
id := strings.TrimSpace(out) |
| ... | ... |
@@ -4227,7 +4227,7 @@ func (s *DockerSuite) TestRunWindowsWithCPUPercent(c *testing.T) {
|
| 4227 | 4227 |
} |
| 4228 | 4228 |
|
| 4229 | 4229 |
func (s *DockerSuite) TestRunProcessIsolationWithCPUCountCPUSharesAndCPUPercent(c *testing.T) {
|
| 4230 |
- testRequires(c, DaemonIsWindows, IsolationIsProcess) |
|
| 4230 |
+ testRequires(c, IsolationIsProcess) |
|
| 4231 | 4231 |
|
| 4232 | 4232 |
out, _ := dockerCmd(c, "run", "--cpu-count=1", "--cpu-shares=1000", "--cpu-percent=80", "--name", "test", "busybox", "echo", "testing") |
| 4233 | 4233 |
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( |
| 4244 | 4244 |
} |
| 4245 | 4245 |
|
| 4246 | 4246 |
func (s *DockerSuite) TestRunHypervIsolationWithCPUCountCPUSharesAndCPUPercent(c *testing.T) {
|
| 4247 |
- testRequires(c, DaemonIsWindows, IsolationIsHyperv) |
|
| 4247 |
+ testRequires(c, IsolationIsHyperv) |
|
| 4248 | 4248 |
|
| 4249 | 4249 |
out, _ := dockerCmd(c, "run", "--cpu-count=1", "--cpu-shares=1000", "--cpu-percent=80", "--name", "test", "busybox", "echo", "testing") |
| 4250 | 4250 |
assert.Assert(c, strings.Contains(strings.TrimSpace(out), "testing")) |