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