summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Callaghan <dcallagh@redhat.com>2014-06-26 11:04:54 +1000
committerGerrit Code Review <gerrit@beaker-project.org>2014-06-26 05:45:35 +0000
commitc27a152f877c3c97a97e9035fe7d88c534270114 (patch)
tree5c429dc0d381b104737f416e0654d325d79e9e0c
parent0e69642aff512b0a8dbec875abd904534ce77042 (diff)
add --ondisk for /boot/efi partition
-rw-r--r--IntegrationTests/src/bkr/inttest/server/test_kickstart.py27
-rw-r--r--Server/bkr/server/snippets/rhts_partitions1
2 files changed, 27 insertions, 1 deletions
diff --git a/IntegrationTests/src/bkr/inttest/server/test_kickstart.py b/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
index e40a575..5642578 100644
--- a/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
+++ b/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
@@ -249,6 +249,7 @@ class KickstartTest(unittest.TestCase):
recipe.provision()
for guest in recipe.guests:
guest.provision()
+ data_setup.mark_job_complete(job, only=True)
return recipe
def test_rhel3_defaults(self):
@@ -2367,7 +2368,31 @@ part /mnt/testarea2 --size=10240 --fstype btrfs
</job>
''', efi_system)
ks = recipe.rendered_kickstart.kickstart
- self.assertIn('\npart /boot/efi --fstype vfat ', ks)
+ self.assertIn('\npart /boot/efi --fstype vfat --size 200 --recommended\n', ks)
+ self.assertNotIn('\npart /boot ', ks)
+ # also check when combined with ondisk
+ recipe = self.provision_recipe('''
+ <job>
+ <whiteboard/>
+ <recipeSet>
+ <recipe ks_meta="ondisk=vdb">
+ <distroRequires>
+ <distro_name op="=" value="RHEL-6.2" />
+ <distro_variant op="=" value="Server" />
+ <distro_arch op="=" value="x86_64" />
+ </distroRequires>
+ <hostRequires/>
+ <partitions>
+ <partition fs="ext4" name="mnt" size="10" />
+ </partitions>
+ <task name="/distribution/install" />
+ </recipe>
+ </recipeSet>
+ </job>
+ ''', efi_system)
+ ks = recipe.rendered_kickstart.kickstart
+ self.assertIn('\npart /boot/efi --fstype vfat --size 200 '
+ '--recommended --ondisk=vdb\n', ks)
self.assertNotIn('\npart /boot ', ks)
def test_anamon(self):
diff --git a/Server/bkr/server/snippets/rhts_partitions b/Server/bkr/server/snippets/rhts_partitions
index a0b2222..dca028f 100644
--- a/Server/bkr/server/snippets/rhts_partitions
+++ b/Server/bkr/server/snippets/rhts_partitions
@@ -25,6 +25,7 @@ part /boot --size 200 --recommended --asprimary
{% if system and system.has_efi %}
{# x86 EFI #}
part /boot/efi --fstype vfat --size 200 --recommended
+{%- if ondisk %} --ondisk={{ ondisk }}{% endif %}
{% else %}
{# x86 BIOS #}
part /boot --size 200 --recommended --asprimary