buildinstall: Log message for boot config change
JIRA: COMPOSE-3945 Signed-off-by: Haibo Lin <hlin@redhat.com>
This commit is contained in:
parent
0c040e0a69
commit
6afbe6d20a
4 changed files with 14 additions and 6 deletions
|
|
@ -1028,12 +1028,17 @@ class TestSymlinkIso(PungiTestCase):
|
|||
class TestTweakConfigs(PungiTestCase):
|
||||
|
||||
def test_tweak_configs(self):
|
||||
logger = mock.Mock()
|
||||
configs = []
|
||||
for cfg in BOOT_CONFIGS:
|
||||
if 'yaboot' not in cfg:
|
||||
configs.append(os.path.join(self.topdir, cfg))
|
||||
touch(configs[-1], ':LABEL=baz')
|
||||
tweak_configs(self.topdir, 'new volid', os.path.join(self.topdir, 'ks.cfg'))
|
||||
found_configs = tweak_configs(self.topdir, 'new volid', os.path.join(self.topdir, 'ks.cfg'), logger=logger)
|
||||
self.assertEqual(
|
||||
logger.info.call_args_list,
|
||||
[mock.call('Boot config %s changed' % os.path.join(self.topdir, cfg)) for cfg in found_configs]
|
||||
)
|
||||
for cfg in configs:
|
||||
self.assertFileContent(
|
||||
cfg, ":LABEL=new\\x20volid ks=hd:LABEL=new\\x20volid:/ks.cfg\n"
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ class TestPatchingIso(unittest.TestCase):
|
|||
input_charset='utf-8',
|
||||
volid='foobar')])
|
||||
self.assertEqual(tweak_configs.call_args_list,
|
||||
[mock.call(ANYTHING, 'foobar', 'path/to/ks.cfg')])
|
||||
[mock.call(ANYTHING, 'foobar', 'path/to/ks.cfg', logger=log)])
|
||||
self.assertEqual(copy_all.mock_calls,
|
||||
[mock.call('mounted-iso-dir', ANYTHING)])
|
||||
self.assertEqual(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue