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:
Brian C. Lane 2019-08-20 16:45:26 -07:00
parent 6f686ff9d6
commit 4da4b665ef

View File

@ -264,7 +264,7 @@ class ImgUtilsTest(unittest.TestCase):
with tempfile.TemporaryDirectory(prefix="lorax.test.") as work_dir:
with tempfile.NamedTemporaryFile(prefix="lorax.test.disk.") as disk_img:
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)
self.assertTrue(os.path.exists(disk_img.name))
file_details = get_file_magic(disk_img.name)