Skip to content

Commit

Permalink
Try several times to build the container
Browse files Browse the repository at this point in the history
Seems this is the only point where the podman tests are still
failing with the random network errors tracked in #2063. Let's
give several attempts to build the container to reduce the
failures.
  • Loading branch information
psss committed Nov 8, 2023
1 parent 26c915c commit 0a0060f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/provision/become/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ rlJournalStart
if [[ "$PROVISION_METHODS" =~ container ]]; then
rlPhaseStartSetup
rlRun "pushd data"
rlRun "podman build -t become-container-test:latest ."
for attempt in {1..5}; do
if rlRun "podman build -t become-container-test:latest ."; then
break
else
echo "Attempt $attempt unsuccessful."
[[ $attempt == 5 ]] && rlDie "Unable to prepare the image"
sleep 5
fi
done
rlPhaseEnd

rlPhaseStartTest "Container, test with become=true"
Expand Down

0 comments on commit 0a0060f

Please sign in to comment.