Commit Graph

19 Commits

Author SHA1 Message Date
44a6bbe938 Add a new request package in integration-cli
The goal is to remove function from `docker_utils.go` and setup
simple, one-responsability package that can be well tested ; and to
ease writing request.

This moves all the calls to `sockRequest` (and similar methods) to
their counterpart in the `request` package.

This introduce `request.Do` to write easier request (with functional
argument to easily augment the request) with some pre-defined function
for the most used http method (i.e. `request.Get`, `request.Post` and
`request.Delete`).

Few of the `sockRequest` call have been moved to `request.Do` (and
`Get`, etc.) to showcase the usage of the package. There is still a
whole lot to do.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d69d4799a312dfcae63442e290ae6667afd1a038
Component: engine
2017-01-03 11:49:30 +01:00
2758f0996d Remove pkg/integration and move it to testutil or integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 33968e6c7df164fff0a882c50ae7f4f7e6190e4b
Component: engine
2016-12-30 18:26:34 +01:00
ed910442b7 [nit] integration-cli: obey Go's naming convention
No substantial code change.

 - Api         --> API
 - Cli         --> CLI
 - Http, Https --> HTTP, HTTPS
 - Id          --> ID
 - Uid,Gid,Pid --> UID,PID,PID
 - Ipam        --> IPAM
 - Tls         --> TLS (TestDaemonNoTlsCliTlsVerifyWithEnv --> TestDaemonTLSVerifyIssue13964)

Didn't touch in this commit:
 - Git: because it is officially "Git": https://git-scm.com/
 - Tar: because it is officially "Tar": https://www.gnu.org/software/tar/
 - Cpu, Nat, Mac, Ipc, Shm: for keeping a consistency with existing production code (not changable, for compatibility)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 7fb7a477d79c67ab53c432977780662ccbfeec57
Component: engine
2016-09-30 01:21:05 +00:00
ecda48bde7 Return remote API errors as JSON
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 322e2a7d059a81617b593cf6ece2cfd9f6d4ea03
Component: engine
2016-06-07 18:45:27 -07:00
96b7f387ba Windows CI: Port docker_api_resize_test.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4080ce35e0ffec4703c04e8d9fa0e2def41fddfe
Component: engine
2016-02-03 20:30:06 -08:00
04eb439359 Use checker on integration test when possible
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 710817a71b40287acc546fe2e08367b2a02dae54
Component: engine
2015-10-22 15:53:17 +08:00
c03ccb6893 Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f9a3558a9d75ed6a2f9f1b2d80800226afaa74a5
Component: engine
2015-09-04 12:32:40 -07:00
abe73960d5 Use dockerCmd when possible (#14603)
- integration-cli/docker_cli_attach_test.go
- integration-cli/docker_cli_attach_unix_test.go
- integration-cli/docker_cli_build_test.go
- integration-cli/docker_cli_build_unix_test.go
- integration-cli/docker_cli_by_digest_test.go
- integration-cli/docker_cli_commit_test.go
- integration-cli/docker_cli_config_test.go
- integration-cli/docker_cli_cp_test.go
- integration-cli/docker_cli_create_test.go
- integration-cli/docker_cli_pause_test.go
- integration-cli/docker_cli_port_test.go
- integration-cli/docker_cli_port_unix_test.go
- integration-cli/docker_cli_proxy_test.go
- integration-cli/docker_cli_ps_test.go
- integration-cli/docker_cli_pull_test.go
- integration-cli/docker_cli_push_test.go

- docker_api_attach_test.go
- docker_api_containers_test.go
- docker_api_events_test.go
- docker_api_exec_resize_test.go
- docker_api_exec_test.go
- docker_api_images_test.go
- docker_api_info_test.go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5c295460da2098d971eda28a73b416ff6be62f53
Component: engine
2015-07-14 21:52:43 +02:00
74db1507f9 Fixing statusCode checks for sockRequest
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
Upstream-commit: c7845e27ee2b0462b01d043caeb771f21d5e4ac7
Component: engine
2015-04-23 15:35:56 -07:00
1884ef3b9b Use suite for integration-cli
It prints test name and duration for each test.
Also performs deleteAllContainers after each test.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: dc944ea7e48d11a2906e751d3e61daf08faee054
Component: engine
2015-04-21 10:28:52 -07:00
ab385b72f9 Fix errors due changed sockRequest signature
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 27fccdbabb277e29488de88f9af2e7b83af93132
Component: engine
2015-04-13 10:30:07 -07:00
05674d127e Merge pull request #12320 from runcom/fix-api-resize-exec-resize
fix api server resize&execResize
Upstream-commit: 6f928be7ef7d8610875e860e72433dc2477b1c5d
Component: engine
2015-04-13 09:59:11 -07:00
83596c55e6 fix api server resize&execResize
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 3341f3a3554524f0f5e6114dfa0ed988713803ef
Component: engine
2015-04-13 08:42:12 +02:00
b3c5a7d38d Remove job from logs
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 91bfed604959c591a076c2e330cb3ded7443f504
Component: engine
2015-04-13 08:25:31 +02:00
7c9d740c01 api_resize_test: fix a typo
s/cintainer/container

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Upstream-commit: 4ddc721f234ebb721b9540af3a9358da2f3e6e58
Component: engine
2015-04-10 03:09:26 -04:00
ab9a366f0e Remove stripTrailingCharacters from tests
This was just an alias to `strings.TrimSpace`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 475c65319b4663d630711519e18d0b134c42c7f1
Component: engine
2015-04-06 09:21:18 -04:00
67d69faf00 Check for no Cmd on exec create endpoint
Fixes #9414

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c8a3d31332074ddc226086ff1f0c042b6e120232
Component: engine
2014-12-01 17:54:15 -05:00
884eb7da74 Fix the documentation and integration test for container resize
Closes #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 91fb9b2f5a07232cecfcde38a98c3ec6410239b7
Component: engine
2014-11-17 18:38:08 +00:00
d9b4e1dcc3 Allowing resize tty to only work when container is started
Addresses #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 78a272ce14a43f81a79f1b948d5cfd120405f8c9
Component: engine
2014-10-23 21:31:34 +00:00