diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index ea1e625..d544946 100755 --- a/tests/scripts/run_tests.sh +++ b/tests/scripts/run_tests.sh @@ -39,14 +39,27 @@ function umount_dirs { # Only add kickstart function ks_only { - running "Add kickstart to iso" + running "Add kickstart to iso using --ks" mkksiso --ks $KS $BOOTISO $OUTISO || exit 1 mount $OUTISO $ISODIR || exit 1 test_ks - status "Add kickstart" + status "Add kickstart to iso using --ks" + 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 } @@ -155,6 +168,15 @@ function test_quiet { ! 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" +} + function test_files { [ -e "$ISODIR/services" ] || fail "Missing file from iso" @@ -214,11 +236,13 @@ fi # Test mkksiso on the new boot.iso ks_only +ks_pos_only ks_serial only_serial new_volid add_files remove_quiet +test_two_kickstarts run_all run_as_user