This commit refactors grub2 installation method to split it in two parts. Former grub2.install method was meant to run the grub2-install tool, however, in addition it was also running the secure boot installation shim-install. The install method in KIWI is skipped for those architectures and firmware combinations for which bios support doesn't exist. This was leading to skip the secure boot installation. The current approach strips the secure boot installation logic from the grub2.install method, so skipping the install method does not automatically result in skipping the secure boot installation. Fixes bsc#1182211
24 lines
627 B
Python
24 lines
627 B
Python
from mock import Mock
|
|
from pytest import raises
|
|
|
|
from kiwi.bootloader.install.base import BootLoaderInstallBase
|
|
|
|
|
|
class TestBootLoaderInstallBase:
|
|
def setup(self):
|
|
self.bootloader = BootLoaderInstallBase(
|
|
'root_dir', Mock()
|
|
)
|
|
|
|
def test_install(self):
|
|
with raises(NotImplementedError):
|
|
self.bootloader.install()
|
|
|
|
def test_install_required(self):
|
|
with raises(NotImplementedError):
|
|
self.bootloader.install_required()
|
|
|
|
def test_secure_boot_install(self):
|
|
with raises(NotImplementedError):
|
|
self.bootloader.secure_boot_install()
|