3341f3a3 | package main import ( |
27fccdba | "net/http" |
3341f3a3 | "os/exec" "strings" |
dc944ea7 | "github.com/go-check/check" |
3341f3a3 | ) |
dc944ea7 | func (s *DockerSuite) TestExecResizeApiHeightWidthNoInt(c *check.C) { |
3341f3a3 | runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "top") out, _, err := runCommandWithOutput(runCmd) if err != nil { |
dc944ea7 | c.Fatalf(out, err) |
3341f3a3 | } cleanedContainerID := strings.TrimSpace(out) endpoint := "/exec/" + cleanedContainerID + "/resize?h=foo&w=bar" |
27fccdba | status, _, err := sockRequest("POST", endpoint, nil) |
c7845e27 | c.Assert(status, check.Equals, http.StatusInternalServerError) c.Assert(err, check.IsNil) |
3341f3a3 | } |