-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix buildah-bud tests by using main's diff file
Signed-off-by: Matthew Heon <[email protected]>
- Loading branch information
Showing
1 changed file
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From d684753d6f00ee95720d8fb2e09c7ac19b37b01e Mon Sep 17 00:00:00 2001 | ||
From 5baab334cac9853c1d4bae9466d46dbbe5ff7158 Mon Sep 17 00:00:00 2001 | ||
From: Ed Santiago <[email protected]> | ||
Date: Tue, 9 Feb 2021 17:28:05 -0700 | ||
Subject: [PATCH] tweaks for running buildah tests under podman | ||
|
@@ -9,10 +9,10 @@ Signed-off-by: Ed Santiago <[email protected]> | |
1 file changed, 67 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/tests/helpers.bash b/tests/helpers.bash | ||
index 11deb367..44c71dad 100644 | ||
index 166316d5..775d7c9b 100644 | ||
--- a/tests/helpers.bash | ||
+++ b/tests/helpers.bash | ||
@@ -34,6 +34,23 @@ function setup() { | ||
@@ -43,6 +43,23 @@ EOF | ||
ROOTDIR_OPTS="--root ${TESTDIR}/root --runroot ${TESTDIR}/runroot --storage-driver ${STORAGE_DRIVER}" | ||
BUILDAH_REGISTRY_OPTS="--registries-conf ${TESTSDIR}/registries.conf --registries-conf-dir ${TESTDIR}/registries.d --short-name-alias-conf ${TESTDIR}/cache/shortnames.conf" | ||
PODMAN_REGISTRY_OPTS="--registries-conf ${TESTSDIR}/registries.conf" | ||
|
@@ -36,8 +36,8 @@ index 11deb367..44c71dad 100644 | |
} | ||
|
||
function starthttpd() { | ||
@@ -57,6 +74,12 @@ function stophttpd() { | ||
function teardown() { | ||
@@ -84,6 +101,12 @@ function teardown(){ | ||
function teardown_tests() { | ||
stophttpd | ||
|
||
+ if [[ -n "$PODMAN_SERVER_PID" ]]; then | ||
|
@@ -49,7 +49,7 @@ index 11deb367..44c71dad 100644 | |
# Workaround for #1991 - buildah + overlayfs leaks mount points. | ||
# Many tests leave behind /var/tmp/.../root/overlay and sub-mounts; | ||
# let's find those and clean them up, otherwise 'rm -rf' fails. | ||
@@ -129,7 +152,13 @@ function copy() { | ||
@@ -156,7 +179,13 @@ function copy() { | ||
} | ||
|
||
function podman() { | ||
|
@@ -64,13 +64,13 @@ index 11deb367..44c71dad 100644 | |
} | ||
|
||
################# | ||
@@ -164,15 +193,40 @@ function run_buildah() { | ||
@@ -191,15 +220,40 @@ function run_buildah() { | ||
--retry) retry=3; shift;; # retry network flakes | ||
esac | ||
|
||
+ local podman_or_buildah=${BUILDAH_BINARY} | ||
+ local _opts="${ROOTDIR_OPTS} ${BUILDAH_REGISTRY_OPTS}" | ||
+ if [[ $1 == "bud" || $1 == "build-using-dockerfile" ]]; then | ||
+ if [[ $1 == "build" || $1 == "build-using-dockerfile" ]]; then | ||
+ shift | ||
+ # podman defaults to --layers=true; buildah to --false. | ||
+ # If command line includes explicit --layers, leave it untouched, | ||
|
@@ -108,7 +108,7 @@ index 11deb367..44c71dad 100644 | |
# without "quotes", multiple lines are glommed together into one | ||
if [ -n "$output" ]; then | ||
echo "$output" | ||
@@ -396,3 +450,12 @@ function skip_if_no_docker() { | ||
@@ -477,3 +531,12 @@ function skip_if_no_docker() { | ||
skip "this test needs actual docker, not podman-docker" | ||
fi | ||
} | ||
|
@@ -122,5 +122,5 @@ index 11deb367..44c71dad 100644 | |
+ fi | ||
+} | ||
-- | ||
2.31.1 | ||
2.25.1 | ||
|