1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration
Sebastiaan van Stijn 3258d565cf
Fix status code for missing --volumes-from container
If the container specified in `--volumes-from` did not exist, the
API returned a 404 status, which was interpreted by the CLI as the
specified _image_ to be missing (even if that was not the case).

This patch changes these error to return a 400 (bad request);

Before this change:

    # make sure the image is present
    docker pull busybox
    docker create --volumes-from=nosuchcontainer busybox
    # Unable to find image 'busybox:latest' locally
    # latest: Pulling from library/busybox
    # Digest: sha256:95cf004f559831017cdf4628aaf1bb30133677be8702a8c5f2994629f637a209
    # Status: Image is up to date for busybox:latest
    # Error response from daemon: No such container: nosuchcontainer

After this change:

    # make sure the image is present
    docker pull busybox
    docker create --volumes-from=nosuchcontainer busybox
    # Error response from daemon: No such container: nosuchcontainer

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-29 13:28:14 +02:00
..
build int/build/TestBuildWithEmptyLayers: prevent panic 2020-06-04 11:22:04 -07:00
config integration/config: add check for removing non-existing config 2020-04-14 18:31:38 +02:00
container Fix status code for missing --volumes-from container 2020-06-29 13:28:14 +02:00
distribution bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
image Using test names instead of hardcoded ones in integration/image directory 2020-05-18 16:37:09 +01:00
internal API: swarm: move PidsLimit to TaskTemplate.Resources 2020-06-05 12:50:38 +02:00
network TestDaemonDNSFallback: increase timeout to reduce flakiness 2020-06-18 10:10:30 +02:00
plugin Merge pull request #40725 from cpuguy83/check_img_platform 2020-05-21 11:33:27 -07:00
secret integration/secret: add check for empty list not producing an error 2020-04-14 18:31:36 +02:00
service API: swarm: move PidsLimit to TaskTemplate.Resources 2020-06-05 12:50:38 +02:00
session bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
system test-integration: support more rootless tests 2020-03-16 17:37:38 +09:00
testdata/https integration/plugin/authz: port tests from integration-cli 2017-10-02 14:20:59 +01:00
volume bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
doc.go Add canonical import comment 2018-02-05 16:51:57 -05:00