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.
This commit is contained in:
Brian C. Lane 2022-07-13 15:23:16 -07:00
parent 45a8c06660
commit 6f034f08b7
1 changed files with 19 additions and 0 deletions

View File

@ -177,6 +177,24 @@ function run_all {
umount_dirs
}
# All of the changes as a user (lorax-ted)
function run_as_user {
running "Use all the options as a 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
}
# Gather up the list of system repo files and use them for lorax
@ -202,5 +220,6 @@ new_volid
add_files
remove_quiet
run_all
run_as_user
exit $FAILANY