From 3fa61f0004b04340a697a256ff51589a4d3f7c93 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 10 Dec 2020 14:22:36 +0100 Subject: 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 --- test/apiv2/10-images.at | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') 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 \ -- cgit v1.2.3-54-g00ecf