Commit Graph

15 Commits

Author SHA1 Message Date
a24b673f22 fix and skip some tests based on API version
Signed-off-by: Anda Xu <anda.xu@docker.com>

Co-authored-by: Anda Xu <anda.xu@docker.com>
Co-authored-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e440831802a500b28ecf16c2627a294dc31dfeb9
Component: engine
2018-05-15 16:05:04 -07:00
a05c5e914a Move integration-cli/request to internal/test/request…
… and change a bit the method signature

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 42f6fdf059807ecbe66cce90676021363a541154
Component: engine
2018-04-17 16:25:59 +02:00
e48013ec36 Stop using deprecated SockRequest
Signed-off-by: Stanislav Bondarenko <stanislav.bondarenko@gmail.com>
Upstream-commit: 0fd5a654280ef509a6512f84981f28d559869b90
Component: engine
2017-08-23 17:10:04 -04:00
30f1b651e2 Remove string checking in API error handling
Use strongly typed errors to set HTTP status codes.
Error interfaces are defined in the api/errors package and errors
returned from controllers are checked against these interfaces.

Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the
line of causes one of the interfaces is implemented. The special error
interfaces take precedence over Causer, meaning if both Causer and one
of the new error interfaces are implemented, the Causer is not
traversed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ebcb7d6b406fe50ea9a237c73004d75884184c33
Component: engine
2017-08-15 16:01:11 -04:00
43db8c0c15 Introduce test-integration target (and deprecate/freeze test-integration-cli)
This adds a new package `integration` where `engine` integration tests
should live. Those integration tests should not depends on any `cli`
components (except from the `dockerd` daemon for now — to actually
start a daemon).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6b025a8b665f7b976bb2560488ba07f55dbf0fb6
Component: engine
2017-08-09 11:02:57 -04:00
2f0c087a4c set 1ms as container duration minimum value
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: d8b6a35d0272d9bb121dda7d0bc53d0e53d8bd22
Component: engine
2017-04-12 15:45:29 -07:00
5c27e35fbb validate healthcheck params in daemon side
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: e399c558e6eeef519a84a2e0bb11dade5a345014
Component: engine
2017-01-29 13:35:32 +08:00
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
77f8e3ea0c Fix /proc/<pid>/oom_score_adj: invalid argument error caused by empty env name
This fix is part of the fix for issue 25099. In 25099, if an env
has a empty name, then `docker run` will throw out an error:
```
ubuntu@ubuntu:~/docker$ docker run -e =A busybox true
docker: Error response from daemon: invalid header field value "oci runtime error:
container_linux.go:247: starting container process caused \"process_linux.go:295:
setting oom score for ready process caused \\\"write /proc/83582/oom_score_adj:
invalid argument\\\"\"\n".
```

This fix validates the Env in the container spec before it is sent
to containerd/runc.

Integration tests have been created to cover the changes.

This fix is part of fix for 25099 (not complete yet, non-utf case
may require a fix in `runc`).
This fix is related to 25300.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 818d55c34bed99b108e6102ef6aa6ef181567ce3
Component: engine
2016-11-07 08:15:26 -08: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
f06c5a3e4c Fix error message in container creation
Error message was different if image was specified with the full ID.

Fixes #19652

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8a68315c38d7e62b140e145766e842de07d0422d
Component: engine
2016-01-25 11:45:20 -08:00
6bc6afa199 Added c.Assert statements to docker_api_create_test.go
removed the if/else statements and added c.Assert statements for docker_api_create_test.go.

Removed check.commentf in c.Assert statements

Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>
Upstream-commit: 6694326d5d23ab866d1fccf1f9cbcedfd8a31e85
Component: engine
2015-11-01 19:54:19 -08:00
58471ed642 Minor fix: remove redundant tag name in error message of create failed.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 16220e06810c38b8e531c3508221458ffb330e97
Component: engine
2015-08-30 10:43:33 +08:00