Move buildinstall results to final directories if using pungi-buildinstall Koji plugin.
If Koji pungi-buildinstall is used, then the buildinstall results are stored in the `output_dir` dir, but in "results" and "logs" subdirectories. We need to move them to final_output_dir. Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit is contained in:
parent
3cd94a4aa5
commit
145c3adbef
4 changed files with 80 additions and 2 deletions
|
|
@ -1008,6 +1008,30 @@ class TestCopyAll(PungiTestCase):
|
|||
self.assertEqual(os.readlink(os.path.join(self.dst, "symlink")), "broken")
|
||||
|
||||
|
||||
class TestMoveAll(PungiTestCase):
|
||||
def setUp(self):
|
||||
super(TestMoveAll, self).setUp()
|
||||
self.src = os.path.join(self.topdir, "src")
|
||||
self.dst = os.path.join(self.topdir, "dst")
|
||||
util.makedirs(self.src)
|
||||
|
||||
def test_move_all(self):
|
||||
touch(os.path.join(self.src, "target"))
|
||||
util.move_all(self.src, self.dst)
|
||||
|
||||
self.assertTrue(os.path.isfile(os.path.join(self.dst, "target")))
|
||||
self.assertTrue(os.path.exists(os.path.join(self.src)))
|
||||
self.assertFalse(os.path.isfile(os.path.join(self.src, "target")))
|
||||
|
||||
def test_move_all_rm_src_dir(self):
|
||||
touch(os.path.join(self.src, "target"))
|
||||
util.move_all(self.src, self.dst, rm_src_dir=True)
|
||||
|
||||
self.assertTrue(os.path.isfile(os.path.join(self.dst, "target")))
|
||||
self.assertFalse(os.path.exists(os.path.join(self.src)))
|
||||
self.assertFalse(os.path.isfile(os.path.join(self.src, "target")))
|
||||
|
||||
|
||||
@mock.patch("six.moves.urllib.request.urlretrieve")
|
||||
class TestAsLocalFile(PungiTestCase):
|
||||
def test_local_file(self, urlretrieve):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue