From fe96c843bfb16c276144aeaf538c2b755e05e280 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Fri, 11 Oct 2024 11:39:41 -0600 Subject: [PATCH] APIv2 test fix: image history I'm assuming this was buildah#5595: the COMMENT field moved around. Deal with it, and add a few more checks while we're at it. Signed-off-by: Ed Santiago --- test/apiv2/10-images.at | 32 +++++++++++++++++++++++++++++--- test/apiv2/20-containers.at | 2 +- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at index 375a9f984e..eb434ba4fc 100644 --- a/test/apiv2/10-images.at +++ b/test/apiv2/10-images.at @@ -85,19 +85,45 @@ t GET libpod/images/nonesuch/history 404 for i in $iid ${iid:0:12} $PODMAN_TEST_IMAGE_NAME:$PODMAN_TEST_IMAGE_TAG; do t GET libpod/images/$i/history 200 \ .[0].Id=$iid \ + .[1].Id="" \ + .[2].Id="" \ + .[3].Id="" \ .[0].Created~[0-9]\\{10\\} \ .[0].Tags[0]="$IMAGE" \ .[0].Size=1024 \ - .[0].Comment="FROM localhost/interim-image:latest" + .[1].Size=0 \ + .[2].Size=0 \ + .[3].Size=0 \ + .[0].Comment="" \ + .[1].Comment="" \ + .[2].Comment="" \ + .[3].Comment="FROM localhost/interim-image:latest" \ + .[0].CreatedBy~".*/echo.*This container is intended for podman CI testing.*" \ + .[1].CreatedBy~".* WORKDIR /home/podman" \ + .[2].CreatedBy~".* LABEL created_at=.*" \ + .[3].CreatedBy~".* LABEL created_by=test/system/build-testimage" done for i in $iid ${iid:0:12} $PODMAN_TEST_IMAGE_NAME:$PODMAN_TEST_IMAGE_TAG; do t GET images/$i/history 200 \ - .[0].Id="sha256:"$iid \ + .[0].Id="sha256:$iid" \ + .[1].Id="sha256:" \ + .[2].Id="sha256:" \ + .[3].Id="sha256:" \ .[0].Created~[0-9]\\{10\\} \ .[0].Tags[0]="$IMAGE" \ .[0].Size=1024 \ - .[0].Comment="FROM localhost/interim-image:latest" + .[1].Size=0 \ + .[2].Size=0 \ + .[3].Size=0 \ + .[0].Comment="" \ + .[1].Comment="" \ + .[2].Comment="" \ + .[3].Comment="FROM localhost/interim-image:latest" \ + .[0].CreatedBy~".*/echo.*This container is intended for podman CI testing.*" \ + .[1].CreatedBy~".* WORKDIR /home/podman" \ + .[2].CreatedBy~".* LABEL created_at=.*" \ + .[3].CreatedBy~".* LABEL created_by=test/system/build-testimage" done # compat api pull image unauthorized message error diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at index 011c8f289b..41039f22d7 100644 --- a/test/apiv2/20-containers.at +++ b/test/apiv2/20-containers.at @@ -213,7 +213,7 @@ iid=$(jq -r '.Id' <<<"$output") t GET libpod/images/$iid/json 200 \ .RepoTags[0]=null \ .Author="" \ - .Comment="" + .Comment~"FROM docker\.io/.*" # Commit a new image w/o tag cparam="repo=newrepo&comment=foo&author=bob&format=docker"