github.com/SophiaGitHub/hello@v1.7.1-rc3/integration-cli/docker_api_exec_resize_test.go (about) 1 package main 2 3 import ( 4 "net/http" 5 "os/exec" 6 "strings" 7 8 "github.com/go-check/check" 9 ) 10 11 func (s *DockerSuite) TestExecResizeApiHeightWidthNoInt(c *check.C) { 12 runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "top") 13 out, _, err := runCommandWithOutput(runCmd) 14 if err != nil { 15 c.Fatalf(out, err) 16 } 17 cleanedContainerID := strings.TrimSpace(out) 18 19 endpoint := "/exec/" + cleanedContainerID + "/resize?h=foo&w=bar" 20 status, _, err := sockRequest("POST", endpoint, nil) 21 c.Assert(status, check.Equals, http.StatusInternalServerError) 22 c.Assert(err, check.IsNil) 23 }