summaryrefslogtreecommitdiff
path: root/tests/integration/api_build_test.py
Commit message (Collapse)AuthorAgeFilesLines
* Add SSH testsaiordache2020-10-051-1/+0
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* Update alpine version to 3.10, and rename BUSYBOX variableSebastiaan van Stijn2019-08-101-2/+2
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Adjust `--platform` tests for changes in docker engineSebastiaan van Stijn2019-07-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests started failing on recent versions of the engine because the error string changed, and due to a regression, the status code for one endpoint changed from a 400 to a 500. On Docker 18.03: The `docker build` case properly returns a 400, and "invalid platform" as error string; ```bash docker build --platform=foobar -<<EOF FROM busybox EOF Sending build context to Docker daemon 2.048kB Error response from daemon: invalid platform: invalid platform os "foobar" ``` ``` DEBU[2019-07-15T12:17:22.745511870Z] Calling GET /_ping DEBU[2019-07-15T12:17:22.748224796Z] Calling POST /session DEBU[2019-07-15T12:17:22.748692282Z] Calling POST /v1.37/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&platform=foobar&rm=1&session=d7b6ceba9d8d0aed67a805528554feb5285781fe888a4bf4e0c15cb09bffd614&shmsize=0&target=&ulimits=null ``` The `docker pull --platform=foobar hello-world:latest` case incorrectly returns a 500 ``` DEBU[2019-07-15T12:16:08.744827612Z] Calling POST /v1.37/images/create?fromImage=hello-world&platform=foobar&tag=latest DEBU[2019-07-15T12:16:08.745594874Z] FIXME: Got an API for which error does not match any expected type!!!: invalid platform: invalid platform os "foobar" error_type="*errors.errorString" module=api ERRO[2019-07-15T12:16:08.745916686Z] Handler for POST /v1.37/images/create returned error: invalid platform: invalid platform os "foobar" DEBU[2019-07-15T12:16:08.746191172Z] FIXME: Got an API for which error does not match any expected type!!!: invalid platform: invalid platform os "foobar" error_type="*errors.errorString" module=api ``` On Docker 18.09; ```bash docker build --platform=foobar -<<EOF FROM busybox EOF Error response from daemon: "foobar": unknown operating system or architecture: invalid argument ``` Which incorrectly returns a 500 status; ``` DEBU[2019-07-15T11:59:20.687268380Z] Calling POST /v1.39/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&platform=foobar&rm=1&session=jko7kejjvs93judyfnq7shoda&shmsize=0&target=&ulimits=null&version=1 DEBU[2019-07-15T11:59:20.687282279Z] Calling POST /session INFO[2019-07-15T11:59:20.687761392Z] parsed scheme: "" module=grpc INFO[2019-07-15T11:59:20.687833668Z] scheme "" not registered, fallback to default scheme module=grpc INFO[2019-07-15T11:59:20.688017578Z] ccResolverWrapper: sending new addresses to cc: [{ 0 <nil>}] module=grpc INFO[2019-07-15T11:59:20.688270160Z] ClientConn switching balancer to "pick_first" module=grpc INFO[2019-07-15T11:59:20.688353083Z] pickfirstBalancer: HandleSubConnStateChange: 0xc4209b0630, CONNECTING module=grpc INFO[2019-07-15T11:59:20.688985698Z] pickfirstBalancer: HandleSubConnStateChange: 0xc4209b0630, READY module=grpc DEBU[2019-07-15T11:59:20.812700550Z] client is session enabled DEBU[2019-07-15T11:59:20.813139288Z] FIXME: Got an API for which error does not match any expected type!!!: invalid argument github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init /go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:40 github.com/docker/docker/vendor/github.com/containerd/containerd/content.init <autogenerated>:1 github.com/docker/docker/builder/builder-next.init <autogenerated>:1 github.com/docker/docker/api/server/backend/build.init <autogenerated>:1 main.init <autogenerated>:1 runtime.main /usr/local/go/src/runtime/proc.go:186 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:2361 error_type="*errors.fundamental" module=api ERRO[2019-07-15T11:59:20.813210677Z] Handler for POST /v1.39/build returned error: "foobar": unknown operating system or architecture: invalid argument DEBU[2019-07-15T11:59:20.813276737Z] FIXME: Got an API for which error does not match any expected type!!!: invalid argument github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init /go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:40 github.com/docker/docker/vendor/github.com/containerd/containerd/content.init <autogenerated>:1 github.com/docker/docker/builder/builder-next.init <autogenerated>:1 github.com/docker/docker/api/server/backend/build.init <autogenerated>:1 main.init <autogenerated>:1 runtime.main /usr/local/go/src/runtime/proc.go:186 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:2361 error_type="*errors.fundamental" module=api ``` Same for the `docker pull --platform=foobar hello-world:latest` case: ```bash docker pull --platform=foobar hello-world:latest Error response from daemon: "foobar": unknown operating system or architecture: invalid argument ``` ``` DEBU[2019-07-15T12:00:18.812995330Z] Calling POST /v1.39/images/create?fromImage=hello-world&platform=foobar&tag=latest DEBU[2019-07-15T12:00:18.813229172Z] FIXME: Got an API for which error does not match any expected type!!!: invalid argument github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init /go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:40 github.com/docker/docker/vendor/github.com/containerd/containerd/content.init <autogenerated>:1 github.com/docker/docker/builder/builder-next.init <autogenerated>:1 github.com/docker/docker/api/server/backend/build.init <autogenerated>:1 main.init <autogenerated>:1 runtime.main /usr/local/go/src/runtime/proc.go:186 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:2361 error_type="*errors.fundamental" module=api ERRO[2019-07-15T12:00:18.813365546Z] Handler for POST /v1.39/images/create returned error: "foobar": unknown operating system or architecture: invalid argument DEBU[2019-07-15T12:00:18.813461428Z] FIXME: Got an API for which error does not match any expected type!!!: invalid argument github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init /go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:40 github.com/docker/docker/vendor/github.com/containerd/containerd/content.init <autogenerated>:1 github.com/docker/docker/builder/builder-next.init <autogenerated>:1 github.com/docker/docker/api/server/backend/build.init <autogenerated>:1 main.init <autogenerated>:1 runtime.main /usr/local/go/src/runtime/proc.go:186 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:2361 error_type="*errors.fundamental" module=api ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Style fixes and removed some unused code2199-proxy-supportJoffrey F2019-01-091-3/+8
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* add integration tests for proxy supportCorentin Henry2019-01-091-0/+38
| | | | Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
* Add xfail to ignore 18.09 beta bugJoffrey F2018-10-311-0/+5
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Avoid unwanted modification of dockerfile pathJoffrey F2018-05-251-9/+44
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* prune_builds testJoffrey F2018-04-251-0/+6
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Support absolute paths for in-context DockerfilesJoffrey F2018-04-121-1/+32
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Properly handle relative Dockerfile paths and Dockerfile on different drivesJoffrey F2018-03-301-0/+32
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Support building with Dockerfile outside of contextJoffrey F2018-03-271-0/+33
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add isolation param to buildJoffrey F2018-03-231-0/+15
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Improve dockerignore comment testJoffrey F2018-03-051-1/+5
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix flake8 caseWanzhi Du2018-03-051-1/+1
| | | | Signed-off-by: Wanzhi Du <wanzhi09@gmail.com>
* Ignore comment line from the .dockerignore fileWanzhi Du2018-03-051-1/+2
| | | | | | | | | This fixed the bug that test comment line in .dockerignore file as ignore rule bug. Add test for "# comment" patterns in .dockerignore. Signed-off-by: Wanzhi Du <wanzhi09@gmail.com>
* Refuse API version < 1.21 ; Remove associated code pathscleanup_deprecatedJoffrey F2018-01-311-10/+6
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Use pytest assertspytest-assertsJoffrey F2018-01-301-12/+11
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add support for experimental platform flag in build and pull1855-platform-optionJoffrey F2018-01-231-0/+15
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Ignore dockerignore lines that contain only whitespace1852-dockerignoreJoffrey F2018-01-031-0/+22
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Update test engine versions in Jenkinsfile2.6.0Joffrey F2017-11-071-1/+1
| | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com> Conflicts: Jenkinsfile
* OopsJoffrey F2017-11-071-1/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix build tests to not rely on internet connectivityJoffrey F2017-11-071-10/+20
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add support for extra_hosts option in buildJoffrey F2017-11-071-0/+32
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix handling of non-multiplexed (TTY) streams over upgraded socketsJoffrey F2017-08-171-1/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add support for the `squash` flag when buildingGabriel Féron2017-08-171-1/+27
| | | | | | Also added a test that compares the number of layers in the default mode, and with the new flag Signed-off-by: Gabriel Féron <feron.gabriel@gmail.com>
* Add network_mode support to Client.build1397-build-networkJoffrey F2017-06-191-0/+33
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add `target` argument to image buildingYong Wen Chua2017-05-161-0/+22
| | | | | | | | | | This is related to the multi-stage image building that was introduced in 17.05 (API 1.29). This allows a user to specify the stage of a multi-stage Dockerfile to build for, rather than the final stage. Signed-off-by: Yong Wen Chua <me@yongwen.xyz>
* Rename cachefrom -> cache_fromJoffrey F2017-02-151-15/+29
| | | | | | | Fix cache_from integration test Fix image ID detection in ImageCollection.build Signed-off-by: Joffrey F <joffrey@docker.com>
* Add stop_timeout to create_containerJoffrey F2017-01-271-0/+4
| | | | | | Fix requires_api_version test decorator Signed-off-by: Joffrey F <joffrey@docker.com>
* Implement cachefromThomas Schaaf2017-01-261-0/+18
| | | | Signed-off-by: Thomas Schaaf <schaaf@komola.de>
* Remove MAINTAINER from DockerfilesBen Firshman2016-11-241-4/+0
| | | | | | | | It was deprecated in https://github.com/docker/docker/pull/25466 (Sorry @shin- ;) Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Split out base integration test for APIClientBen Firshman2016-11-221-2/+2
| | | | | | So the cleanup stuff can be reused for model tests. Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Rename Client to APIClientBen Firshman2016-11-221-0/+202
Signed-off-by: Ben Firshman <ben@firshman.co.uk>