tests: Use server-2.repo instead of single.repo
And use the working directory for the graft, not the root filesystem.
This commit is contained in:
parent
6f686ff9d6
commit
4da4b665ef
@ -264,7 +264,7 @@ class ImgUtilsTest(unittest.TestCase):
|
|||||||
with tempfile.TemporaryDirectory(prefix="lorax.test.") as work_dir:
|
with tempfile.TemporaryDirectory(prefix="lorax.test.") as work_dir:
|
||||||
with tempfile.NamedTemporaryFile(prefix="lorax.test.disk.") as disk_img:
|
with tempfile.NamedTemporaryFile(prefix="lorax.test.disk.") as disk_img:
|
||||||
mkfakerootdir(work_dir)
|
mkfakerootdir(work_dir)
|
||||||
graft = {"/etc/yum.repos.d/": "./tests/pylorax/repos/single.repo"}
|
graft = {work_dir+"/etc/yum.repos.d/": "./tests/pylorax/repos/server-2.repo"}
|
||||||
mkext4img(work_dir, disk_img.name, graft=graft)
|
mkext4img(work_dir, disk_img.name, graft=graft)
|
||||||
self.assertTrue(os.path.exists(disk_img.name))
|
self.assertTrue(os.path.exists(disk_img.name))
|
||||||
file_details = get_file_magic(disk_img.name)
|
file_details = get_file_magic(disk_img.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user