systemd-boot tools like kernel-install expect a certain entry naming policy. This commit adapts kiwi to adapt to this policy. The name for the default entry is constructed out of the ID information from /etc/os-release followed by the name of the kernel as it is represented by the directory name in /lib/modules/... This Fixes #2417
20 lines
484 B
Python
20 lines
484 B
Python
from pytest import raises
|
|
|
|
from kiwi.utils.os_release import OsRelease
|
|
from kiwi.exceptions import KiwiOSReleaseImportError
|
|
|
|
|
|
class TestOsRelease(object):
|
|
def setup(self):
|
|
self.os_release = OsRelease('../data')
|
|
|
|
def setup_method(self, cls):
|
|
self.setup()
|
|
|
|
def test_setup_raises(self):
|
|
with raises(KiwiOSReleaseImportError):
|
|
OsRelease('does-not-exist')
|
|
|
|
def test_get(self):
|
|
assert self.os_release.get('ID') == 'opensuse-leap'
|