mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix the documentation and integration test for container resize
Closes #8728 Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
This commit is contained in:
parent
34cb92e2d4
commit
91fb9b2f5a
4 changed files with 6 additions and 28 deletions
|
@ -44,7 +44,7 @@
|
|||
[`POST /containers/(id)/wait`](../reference/api/docker_remote_api_v1.9/#post--containers-(id)-wait) **
|
||||
[`POST /containers/create`](../reference/api/docker_remote_api_v1.9/#post--containers-create) **
|
||||
[`GET /containers/json`](../reference/api/docker_remote_api_v1.9/#get--containers-json) **
|
||||
[`GET /containers/resize`](../reference/api/docker_remote_api_v1.9/#get--containers-resize) **
|
||||
[`POST /containers/(id)/resize`](../reference/api/docker_remote_api_v1.9/#get--containers-resize) **
|
||||
|
||||
**/events**
|
||||
[`GET /events`](../reference/api/docker_remote_api_v1.9/#get--events) **
|
||||
|
|
|
@ -471,13 +471,13 @@ Status Codes:
|
|||
|
||||
### Resize a container TTY
|
||||
|
||||
`GET /containers/(id)/resize?h=<height>&w=<width>`
|
||||
`POST /containers/(id)/resize?h=<height>&w=<width>`
|
||||
|
||||
Resize the TTY of container `id`
|
||||
Resize the TTY for container with `id`. The container must be restarted for the resize to take effect.
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/4fa6e0f0c678/resize?h=40&w=80 HTTP/1.1
|
||||
POST /containers/4fa6e0f0c678/resize?h=40&w=80 HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
@ -489,7 +489,7 @@ Status Codes:
|
|||
|
||||
- **200** – no error
|
||||
- **404** – No such container
|
||||
- **500** – bad file descriptor
|
||||
- **500** – Cannot resize container
|
||||
|
||||
### Start a container
|
||||
|
||||
|
|
|
@ -364,28 +364,6 @@ Status Codes:
|
|||
- **404** – no such container
|
||||
- **500** – server error
|
||||
|
||||
### Resize a container TTY
|
||||
|
||||
`GET /containers/(id)/resize?h=<height>&w=<width>`
|
||||
|
||||
Resize the TTY of container `id`
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/4fa6e0f0c678/resize?h=40&w=80 HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – No such container
|
||||
- **500** – bad file descriptor
|
||||
|
||||
### Start a container
|
||||
|
||||
`POST /containers/(id)/start`
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
func TestResizeApiResponse(t *testing.T) {
|
||||
runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "true")
|
||||
runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "top")
|
||||
out, _, err := runCommandWithOutput(runCmd)
|
||||
if err != nil {
|
||||
t.Fatalf(out, err)
|
||||
|
|
Loading…
Reference in a new issue