diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2020-12-10 14:22:36 +0100 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2020-12-10 14:35:17 +0100 |
commit | 3fa61f0004b04340a697a256ff51589a4d3f7c93 (patch) | |
tree | d008c4e7ec0dee1332de5710b7f7f0dd437a29f1 /test/apiv2/10-images.at | |
parent | eaa19a1c10c8eb2e5d8a0d864c123c2f3484b01a (diff) | |
download | podman-3fa61f0004b04340a697a256ff51589a4d3f7c93.tar.gz podman-3fa61f0004b04340a697a256ff51589a4d3f7c93.tar.bz2 podman-3fa61f0004b04340a697a256ff51589a4d3f7c93.zip |
Fix panic in libpod images exists endpoint
The libpod images exists endpoint panics when called with
a non existing image and therefore returns 500 as status
code instead of the expected 404.
A test is added to ensure it is working.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test/apiv2/10-images.at')
-rw-r--r-- | test/apiv2/10-images.at | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at index c105a9278..7b500bf57 100644 --- a/test/apiv2/10-images.at +++ b/test/apiv2/10-images.at @@ -12,6 +12,8 @@ iid=$(jq -r '.[0].Id' <<<"$output") t GET libpod/images/$iid/exists 204 t GET libpod/images/$PODMAN_TEST_IMAGE_NAME/exists 204 +t GET libpod/images/${iid}abcdef/exists 404 \ + .cause="failed to find image ${iid}abcdef" # FIXME: compare to actual podman info t GET libpod/images/json 200 \ |