Browse code

Windows CI: Port docker_api_resize_test.go

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2016/02/03 11:51:42
Showing 1 changed files
... ...
@@ -9,8 +9,7 @@ import (
9 9
 )
10 10
 
11 11
 func (s *DockerSuite) TestResizeApiResponse(c *check.C) {
12
-	testRequires(c, DaemonIsLinux)
13
-	out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
12
+	out, _ := runSleepingContainer(c, "-d")
14 13
 	cleanedContainerID := strings.TrimSpace(out)
15 14
 
16 15
 	endpoint := "/containers/" + cleanedContainerID + "/resize?h=40&w=40"
... ...
@@ -20,8 +19,7 @@ func (s *DockerSuite) TestResizeApiResponse(c *check.C) {
20 20
 }
21 21
 
22 22
 func (s *DockerSuite) TestResizeApiHeightWidthNoInt(c *check.C) {
23
-	testRequires(c, DaemonIsLinux)
24
-	out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
23
+	out, _ := runSleepingContainer(c, "-d")
25 24
 	cleanedContainerID := strings.TrimSpace(out)
26 25
 
27 26
 	endpoint := "/containers/" + cleanedContainerID + "/resize?h=foo&w=bar"
... ...
@@ -31,7 +29,6 @@ func (s *DockerSuite) TestResizeApiHeightWidthNoInt(c *check.C) {
31 31
 }
32 32
 
33 33
 func (s *DockerSuite) TestResizeApiResponseWhenContainerNotStarted(c *check.C) {
34
-	testRequires(c, DaemonIsLinux)
35 34
 	out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
36 35
 	cleanedContainerID := strings.TrimSpace(out)
37 36