Skip to content

Commit 85bcd7e

Browse files
Merge pull request #5901 from nalind/copy-preserving-extended-attributes-test
copy-preserving-extended-attributes: use a different base image
2 parents 471de48 + 65b634b commit 85bcd7e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/copy.bats

+5-3
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ stuff/mystuff"
472472
@test "copy-preserving-extended-attributes" {
473473
createrandom ${TEST_SCRATCH_DIR}/randomfile
474474
# if we need to change which image we use, any image that can provide a working setattr/setcap/getfattr will do
475-
image="quay.io/libpod/systemd-image:20240124"
475+
image="quay.io/libpod/ubuntu"
476476
if ! which setfattr > /dev/null 2> /dev/null; then
477477
skip "setfattr not available, unable to check if it'll work in filesystem at ${TEST_SCRATCH_DIR}"
478478
fi
@@ -486,7 +486,8 @@ stuff/mystuff"
486486
_prefetch $image
487487
run_buildah from --quiet $WITH_POLICY_JSON $image
488488
first="$output"
489-
run_buildah run $first microdnf -y install /usr/bin/setfattr /usr/sbin/setcap
489+
run_buildah run $first apt-get -y update
490+
run_buildah run $first apt-get -y install attr libcap2-bin
490491
run_buildah copy $first ${TEST_SCRATCH_DIR}/randomfile /
491492
# set security.capability
492493
run_buildah run $first setcap cap_setuid=ep /randomfile
@@ -495,7 +496,8 @@ stuff/mystuff"
495496
# copy the file to a second container
496497
run_buildah from --quiet $WITH_POLICY_JSON $image
497498
second="$output"
498-
run_buildah run $second microdnf -y install /usr/bin/getfattr
499+
run_buildah run $second apt-get -y update
500+
run_buildah run $second apt-get -y install attr
499501
run_buildah copy --from $first $second /randomfile /
500502
# compare what the extended attributes look like. if we're on a system with SELinux, there's a label in here, too
501503
run_buildah run $first sh -c "getfattr -d -m . --absolute-names /randomfile | grep -v ^security.selinux | sort"

0 commit comments

Comments
 (0)