Skip to content

Commit

Permalink
Merge pull request #17626 from edsantiago/buildah_bud_rootless
Browse files Browse the repository at this point in the history
buildah-bud tests: don't sudo when rootless is desired
  • Loading branch information
openshift-merge-robot authored Feb 27, 2023
2 parents d37bca5 + d838c08 commit a54a404
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/buildah-bud/run-buildah-bud-tests
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ set -e
# during the git-checkout-buildah step, then come back twenty minutes later
# to an expired sudo prompt and no tests have run. (No need to do this
# for checkout; only when running tests)
if [[ -n $do_test ]]; then
sudo --validate
export SUDO=
if [[ -n $do_test ]] && ! [[ "$PRIV_NAME" == "rootless" ]]; then
SUDO=sudo
$SUDO --validate
fi

# Before pulling buildah (while still cd'ed to podman repo), try to determine
Expand Down Expand Up @@ -227,7 +229,7 @@ review the test failure and double-check your changes.
"
fi

(set -x;sudo env TMPDIR=/var/tmp \
(set -x;$SUDO env TMPDIR=/var/tmp \
PODMAN_BINARY=$PODMAN_BINARY \
PODMAN_SERVER_LOG=$PODMAN_SERVER_LOG \
REMOTE=$REMOTE \
Expand Down

0 comments on commit a54a404

Please sign in to comment.