tests: Add a test to run mkksiso as a user
Make sure that running mkksiso as a user works with the boot.iso. Note that this won't catch problems with other isos with different permissions, like the dvd. Related: rhbz#2088631
This commit is contained in:
parent
888a9a4720
commit
143e19517d
@ -177,6 +177,22 @@ function run_all {
|
|||||||
umount_dirs
|
umount_dirs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# All of the changes as a user (lorax-ted)
|
||||||
|
function run_as_user {
|
||||||
|
[ ! -e "/home/lorax-ted" ] && useradd -m lorax-ted
|
||||||
|
su - lorax-ted -c "mkksiso -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO" || exit 1
|
||||||
|
mount $OUTISO $ISODIR || exit 1
|
||||||
|
|
||||||
|
test_ks
|
||||||
|
test_serial
|
||||||
|
test_volid
|
||||||
|
test_files
|
||||||
|
test_quiet
|
||||||
|
|
||||||
|
status "Use all the options as a user"
|
||||||
|
umount_dirs
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then
|
if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then
|
||||||
echo "Failed to find lorax-templates-rhel templates in /usr/share/lorax/templates.d/"
|
echo "Failed to find lorax-templates-rhel templates in /usr/share/lorax/templates.d/"
|
||||||
@ -205,5 +221,6 @@ new_volid
|
|||||||
add_files
|
add_files
|
||||||
remove_quiet
|
remove_quiet
|
||||||
run_all
|
run_all
|
||||||
|
run_as_user
|
||||||
|
|
||||||
exit $FAILANY
|
exit $FAILANY
|
||||||
|
Loading…
Reference in New Issue
Block a user