| 1 |
# Copyright (c) 2024 SUSE Software Solutions Germany GmbH. All rights reserved. |
| 2 |
# |
| 3 |
# This file is part of kiwi. |
| 4 |
# |
| 5 |
# kiwi is free software: you can redistribute it and/or modify |
| 6 |
# it under the terms of the GNU General Public License as published by |
| 7 |
# the Free Software Foundation, either version 3 of the License, or |
| 8 |
# (at your option) any later version. |
| 9 |
# |
| 10 |
# kiwi is distributed in the hope that it will be useful, |
| 11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
# GNU General Public License for more details. |
| 14 |
# |
| 15 |
# You should have received a copy of the GNU General Public License |
| 16 |
# along with kiwi. If not, see <http://www.gnu.org/licenses/> |
| 17 |
# |
| 18 |
from pytest import raises |
| 19 |
from unittest.mock import Mock |
| 20 |
|
| 21 |
from kiwi.bootloader.config.custom import BootLoaderConfigCustom |
| 22 |
|
| 23 |
|
| 24 |
class TestBootLoaderConfigCustom: |
| 25 |
def setup(self): |
| 26 |
self.bootloader = BootLoaderConfigCustom( |
| 27 |
Mock(), 'root_dir' |
| 28 |
) |
| 29 |
|
| 30 |
def setup_method(self, cls): |
| 31 |
self.setup() |
| 32 |
|
| 33 |
def test_setup_disk_boot_images(self): |
| 34 |
with raises(NotImplementedError): |
| 35 |
self.bootloader.setup_disk_boot_images('0815') |
| 36 |
|
| 37 |
def test_setup_disk_image_config(self): |
| 38 |
with raises(NotImplementedError): |
| 39 |
self.bootloader.setup_disk_image_config(Mock()) |
| 40 |
|
| 41 |
def test_setup_install_boot_images(self): |
| 42 |
with raises(NotImplementedError): |
| 43 |
self.bootloader.setup_install_boot_images('0815') |
| 44 |
|
| 45 |
def test_setup_install_image_config(self): |
| 46 |
with raises(NotImplementedError): |
| 47 |
self.bootloader.setup_install_image_config(Mock()) |
| 48 |
|
| 49 |
def test_setup_live_boot_images(self): |
| 50 |
with raises(NotImplementedError): |
| 51 |
self.bootloader.setup_live_boot_images('0815') |
| 52 |
|
| 53 |
def test_setup_live_image_config(self): |
| 54 |
with raises(NotImplementedError): |
| 55 |
self.bootloader.setup_live_image_config(Mock()) |
| 56 |
|
| 57 |
def test_setup_sysconfig_bootloader(self): |
| 58 |
with raises(NotImplementedError): |
| 59 |
self.bootloader.setup_sysconfig_bootloader() |
| 60 |
|
| 61 |
def test_write(self): |
| 62 |
with raises(NotImplementedError): |
| 63 |
self.bootloader.write() |