createiso: Move code for tweaking treeinfo into a function
The function loads existing treeinfo, removes reference to boot.iso and adds [media] section. This is the basic tweak that should happen for all ISOs. Additional changes depend on the actual content. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
740df1bc6c
commit
bb6e68a853
6 changed files with 187 additions and 38 deletions
|
|
@ -945,5 +945,17 @@ class BreakHardlinksTest(helpers.PungiTestCase):
|
|||
self.assertTrue(os.path.exists(expected))
|
||||
|
||||
|
||||
class TweakTreeinfo(helpers.PungiTestCase):
|
||||
def test_tweaking(self):
|
||||
input = os.path.join(helpers.FIXTURE_DIR, "original-treeinfo")
|
||||
expected = os.path.join(helpers.FIXTURE_DIR, "expected-treeinfo")
|
||||
output = os.path.join(self.topdir, "output")
|
||||
|
||||
ti = createiso.load_and_tweak_treeinfo(input)
|
||||
ti.dump(output)
|
||||
|
||||
self.assertFilesEqual(output, expected)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue