summaryrefslogtreecommitdiff
path: root/test/buildah-bud/run-buildah-bud-tests
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-06-14 06:01:37 -0600
committerEd Santiago <santiago@redhat.com>2022-06-14 10:12:54 -0600
commitbfc446eea3c36f1b6fc164f10c47237d701baa29 (patch)
tree81d263b73d2ed6954c995b8a7547130756cb220e /test/buildah-bud/run-buildah-bud-tests
parentcffed099b8404fa7f136643116020edac2336155 (diff)
downloadpodman-bfc446eea3c36f1b6fc164f10c47237d701baa29.tar.gz
podman-bfc446eea3c36f1b6fc164f10c47237d701baa29.tar.bz2
podman-bfc446eea3c36f1b6fc164f10c47237d701baa29.zip
buildah-bud tests: reenable skipped 'bud' tests
Sigh. Buildah PR https://github.com/containers/buildah/pull/3368 changed 'bud' to 'build' in tests. Podman #11585 well-intentionedly did the same for run-buildah-bud tests ... but did so by *replacing* 'bud' with 'build', not by *adding* 'build' to the list of commands handled by podman-build. Hence, all tests invoking 'run_buildah bud' have been completely untested since then. This remedies that, and deals with all the fallout. Principal among which is the discovery that our exit-code changes are no longer necessary: that thing we did where buildah exit status 1 or 2 became podman exit status 125? That no longer applies. podman now exits with the same status as buildah. This simplifies our diffs, and lets us enable a bunch more tests. Also: - in run-buildah-bud-tests script, run 'sudo --validate' early on. Reason: otherwise, the sudo step happens a few minutes after the script starts (after the git-pull), by which time the user may have stepped away to get coffee, then comes back ten or twenty minutes later to find a stupid sudo prompt and no tests run. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/buildah-bud/run-buildah-bud-tests')
-rwxr-xr-xtest/buildah-bud/run-buildah-bud-tests6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/buildah-bud/run-buildah-bud-tests b/test/buildah-bud/run-buildah-bud-tests
index eb8de5618..4ff062496 100755
--- a/test/buildah-bud/run-buildah-bud-tests
+++ b/test/buildah-bud/run-buildah-bud-tests
@@ -93,6 +93,12 @@ fi
# From here on out, any error is fatal
set -e
+# Run sudo early, to refresh the credentials cache. This is a NOP under CI,
+# but might be appreciated by developers who run this script, step away
+# during the git-checkout-buildah step, then come back twenty minutes later
+# to an expired sudo prompt and no tests have run.
+sudo --validate
+
# Before pulling buildah (while still cd'ed to podman repo), try to determine
# if this is a PR, and if so if it's a revendoring of buildah. We use this to
# try to offer a helpful hint on failure.