From 0601df004920ff766588b481b0e33aa69190affb Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 2 Mar 2022 06:30:03 +1100 Subject: [PATCH] Fix and/or matching for image pre-conditions These matches look like they should be "or" (if any of these images is already there, fail), not "and". This caused some confusion when the image was being leaked (I722ba599fbc690d6cb967070c05215b98a73dcaf) as this wasn't triggering. Change-Id: Ic6dad7bbf9013e994eb80a54bc5191a96bd4be94 --- playbooks/functional-test/docker-buildset.yaml | 6 +++--- playbooks/functional-test/podman-buildset.yaml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/playbooks/functional-test/docker-buildset.yaml b/playbooks/functional-test/docker-buildset.yaml index 4f7f1bd..558251c 100644 --- a/playbooks/functional-test/docker-buildset.yaml +++ b/playbooks/functional-test/docker-buildset.yaml @@ -53,9 +53,9 @@ - name: Print list of images command: docker image ls --all --digests --no-trunc register: image_list - failed_when: - - "'test/image' in image_list.stdout" - - "'alpine' in image_list.stdout" + failed_when: > + ('test/image' in image_list.stdout) or + ('alpine' in image_list.stdout) - name: Pull the image from the buildset registry command: docker pull test/image diff --git a/playbooks/functional-test/podman-buildset.yaml b/playbooks/functional-test/podman-buildset.yaml index 5f118bf..caa22fa 100644 --- a/playbooks/functional-test/podman-buildset.yaml +++ b/playbooks/functional-test/podman-buildset.yaml @@ -50,10 +50,10 @@ - name: Print list of images command: podman image ls --all --digests --no-trunc register: image_list - failed_when: - - "'test/image' in image_list.stdout" - - "'test/quay-image' in image_list.stdout" - - "'alpine' in image_list.stdout" + failed_when: > + ('test/image' in image_list.stdout) or + ('test/quay-image' in image_list.stdout) or + ('alpine' in image_list.stdout) - name: Pull the shadowed docker image from the registry command: podman pull test/image