kiwi-el8/test/unit/bootloader/install/base_test.py
David Cassany c840474e3a
Refactor grub2 installation
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
2021-03-03 15:19:43 +01:00

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()