tests: Add test for positional kickstart usage

Related: rhbz#2037015
This commit is contained in:
Brian C. Lane 2022-07-25 11:15:58 -07:00
parent ef79996dbe
commit 8ac909e342

View File

@ -50,6 +50,19 @@ function ks_only {
umount_dirs umount_dirs
} }
# Only add kickstart
function ks_pos_only {
running "Add kickstart to iso using positional argument"
mkksiso $KS $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_ks
status "Add kickstart to iso using positional argument"
umount_dirs
}
function test_ks { function test_ks {
## This all needs to be another function ## This all needs to be another function
# Is there a kickstart in / of the iso? # Is there a kickstart in / of the iso?
@ -159,6 +172,14 @@ function test_quiet {
! grep "linux.*quiet" "$ISODIR/EFI/BOOT/grub.cfg" || fail "quiet not removed from UEFI grub.cfg cmdline entry" ! grep "linux.*quiet" "$ISODIR/EFI/BOOT/grub.cfg" || fail "quiet not removed from UEFI grub.cfg cmdline entry"
} }
# Test error if passing both --ks FILE and 3 arguments
function test_two_kickstarts {
running "Test two kickstart error"
mkksiso --ks $KS $KS $BOOTISO $OUTISO && fail "No error using --ks and positional argument"
status "Test two kickstart error"
}
# All of the changes # All of the changes
function run_all { function run_all {
@ -215,11 +236,13 @@ fi
# Test mkksiso on the new boot.iso # Test mkksiso on the new boot.iso
ks_only ks_only
ks_pos_only
ks_serial ks_serial
only_serial only_serial
new_volid new_volid
add_files add_files
remove_quiet remove_quiet
test_two_kickstarts
run_all run_all
run_as_user run_as_user