From 8ac909e342e334576a29743715124ed19d379079 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 25 Jul 2022 11:15:58 -0700 Subject: [PATCH] tests: Add test for positional kickstart usage Related: rhbz#2037015 --- tests/scripts/run_tests.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index c7f84e9..222d168 100755 --- a/tests/scripts/run_tests.sh +++ b/tests/scripts/run_tests.sh @@ -50,6 +50,19 @@ function ks_only { 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 { ## This all needs to be another function # 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" } +# 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 function run_all { @@ -215,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