2015-04-13 08:36:04 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2015-04-13 10:30:07 -07:00
|
|
|
"net/http"
|
2015-04-13 08:36:04 +02:00
|
|
|
"os/exec"
|
|
|
|
"strings"
|
2015-04-18 09:46:47 -07:00
|
|
|
|
|
|
|
"github.com/go-check/check"
|
2015-04-13 08:36:04 +02:00
|
|
|
)
|
|
|
|
|
2015-04-18 09:46:47 -07:00
|
|
|
func (s *DockerSuite) TestExecResizeApiHeightWidthNoInt(c *check.C) {
|
2015-04-13 08:36:04 +02:00
|
|
|
runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "top")
|
|
|
|
out, _, err := runCommandWithOutput(runCmd)
|
|
|
|
if err != nil {
|
2015-04-18 09:46:47 -07:00
|
|
|
c.Fatalf(out, err)
|
2015-04-13 08:36:04 +02:00
|
|
|
}
|
|
|
|
cleanedContainerID := strings.TrimSpace(out)
|
|
|
|
|
|
|
|
endpoint := "/exec/" + cleanedContainerID + "/resize?h=foo&w=bar"
|
2015-04-13 10:30:07 -07:00
|
|
|
status, _, err := sockRequest("POST", endpoint, nil)
|
2015-04-20 14:03:56 -07:00
|
|
|
c.Assert(status, check.Equals, http.StatusInternalServerError)
|
|
|
|
c.Assert(err, check.IsNil)
|
2015-04-13 08:36:04 +02:00
|
|
|
}
|