From a63d0400739cd78f166df5f0b9248276b54b7c7b Mon Sep 17 00:00:00 2001 From: Ian Ballou Date: Fri, 4 Oct 2024 11:24:17 -0400 Subject: [PATCH] Attempt to fix container search bats issue with a delay --- bats/fb-katello-container.bats | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bats/fb-katello-container.bats b/bats/fb-katello-container.bats index e31505200..6c23e90fb 100644 --- a/bats/fb-katello-container.bats +++ b/bats/fb-katello-container.bats @@ -21,5 +21,9 @@ load fixtures/content CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]') CONTAINER_PUSH_LABEL=$(echo "${ORGANIZATION_LABEL}/${PRODUCT_LABEL}/${CONTAINER_REPOSITORY_LABEL}-bats-$(date -u '+%s')"| tr '[:upper:]' '[:lower:]') podman push "${HOSTNAME}/${CONTAINER_PULL_LABEL}" "${HOSTNAME}/${CONTAINER_PUSH_LABEL}" + # Sleep for 5 seconds due to an intermittent issue where pushed content + # is not immediately searchable via podman search. + # See https://github.com/theforeman/forklift/pull/1864 for more information. + sleep 5 podman search "${HOSTNAME}/" | grep -q "${CONTAINER_PUSH_LABEL}" }