summaryrefslogtreecommitdiff
path: root/test/system/070-build.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/070-build.bats')
-rw-r--r--test/system/070-build.bats36
1 files changed, 28 insertions, 8 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index a69d32a2f..0e6e97d40 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -6,9 +6,7 @@
load helpers
@test "podman build - basic test" {
- if is_remote && is_rootless; then
- skip "unreliable with podman-remote and rootless; #2972"
- fi
+ skip_if_remote "FIXME: pending #7136"
rand_filename=$(random_string 20)
rand_content=$(random_string 50)
@@ -34,6 +32,7 @@ EOF
# Regression from v1.5.0. This test passes fine in v1.5.0, fails in 1.6
@test "podman build - cache (#3920)" {
+ skip_if_remote "FIXME: pending #7136"
if is_remote && is_rootless; then
skip "unreliable with podman-remote and rootless; #2972"
fi
@@ -81,6 +80,8 @@ EOF
}
@test "podman build - URLs" {
+ skip_if_remote "FIXME: pending #7137"
+
tmpdir=$PODMAN_TMPDIR/build-test
mkdir -p $tmpdir
@@ -100,6 +101,8 @@ EOF
@test "podman build - workdir, cmd, env, label" {
+ skip_if_remote "FIXME: pending #7137"
+
tmpdir=$PODMAN_TMPDIR/build-test
mkdir -p $tmpdir
@@ -162,6 +165,7 @@ EOF
# cd to the dir, so we test relative paths (important for podman-remote)
cd $PODMAN_TMPDIR
run_podman build -t build_test -f build-test/Containerfile build-test
+ local iid="${lines[-1]}"
# Run without args - should run the above script. Verify its output.
export MYENV2="$s_env2"
@@ -229,24 +233,40 @@ Labels.$label_name | $label_value
run_podman run --rm build_test stat -c'%u:%g:%N' /a/b/c/myfile
is "$output" "4:5:/a/b/c/myfile" "file in volume is chowned"
+ # Hey, as long as we have an image with lots of layers, let's
+ # confirm that 'image tree' works as expected
+ run_podman image tree build_test
+ is "${lines[0]}" "Image ID: ${iid:0:12}" \
+ "image tree: first line"
+ is "${lines[1]}" "Tags: \[localhost/build_test:latest]" \
+ "image tree: second line"
+ is "${lines[2]}" "Size: [0-9.]\+[kM]B" \
+ "image tree: third line"
+ is "${lines[3]}" "Image Layers" \
+ "image tree: fourth line"
+ is "${lines[4]}" "... ID: [0-9a-f]\{12\} Size: .* Top Layer of: \[$IMAGE]" \
+ "image tree: first layer line"
+ is "${lines[-1]}" "... ID: [0-9a-f]\{12\} Size: .* Top Layer of: \[localhost/build_test:latest]" \
+ "image tree: last layer line"
+
# Clean up
run_podman rmi -f build_test
}
@test "podman build - stdin test" {
- if is_remote && is_rootless; then
- skip "unreliable with podman-remote and rootless; #2972"
- fi
+ skip_if_remote "FIXME: pending #7136"
- # Random workdir, and multiple random strings to verify command & env
+ # Random workdir, and random string to verify build output
workdir=/$(random_string 10)
+ random_echo=$(random_string 15)
PODMAN_TIMEOUT=240 run_podman build -t build_test - << EOF
FROM $IMAGE
RUN mkdir $workdir
WORKDIR $workdir
-RUN /bin/echo 'Test'
+RUN /bin/echo $random_echo
EOF
is "$output" ".*STEP 5: COMMIT" "COMMIT seen in log"
+ is "$output" ".*STEP .: RUN /bin/echo $random_echo"
run_podman run --rm build_test pwd
is "$output" "$workdir" "pwd command in container"