From 2683ecbbcda750b9339713ced9b974b9dd61b9aa Mon Sep 17 00:00:00 2001
From: Valentin Rothberg <rothberg@redhat.com>
Date: Thu, 2 Dec 2021 13:25:54 +0100
Subject: compat: images/json

Do not list manifest lists.  Docker doesn't either.

Fixes: #12453
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
---
 test/apiv2/10-images.at | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'test/apiv2')

diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index b7bcaf81d..e67f559f3 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -10,6 +10,13 @@ t GET libpod/images/json 200 \
   .[0].Id~[0-9a-f]\\{64\\}
 iid=$(jq -r '.[0].Id' <<<"$output")
 
+# Create an empty manifest and make sure it is not listed
+# in the compat endpoint.
+t GET images/json 200 length=1
+podman manifest create foo
+t GET images/json 200 length=1
+t GET libpod/images/json 200 length=2
+
 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 \
-- 
cgit v1.2.3-54-g00ecf