gather: Do not write metadata if gather phase skipped

Signed-off-by: Haibo Lin <hlin@redhat.com>
This commit is contained in:
Haibo Lin 2019-11-07 16:11:42 +08:00
parent cba3f1c88f
commit 2cbd75803a
2 changed files with 3 additions and 2 deletions

View File

@ -113,8 +113,9 @@ class GatherPhase(PhaseBase):
self.pkgset_phase.package_sets,
manifest=self.manifest)
def stop(self):
self._write_manifest()
def stop(self):
super(GatherPhase, self).stop()

View File

@ -911,7 +911,7 @@ class TestGatherPhase(helpers.PungiTestCase):
phase.stop()
self.assertEqual(gather_wrapper.call_args_list, [])
self.assertTrue(os.path.isfile(os.path.join(self.topdir, 'compose', 'metadata', 'rpms.json')))
self.assertFalse(os.path.isfile(os.path.join(self.topdir, 'compose', 'metadata', 'rpms.json')))
def test_validates_wrong_requiring_variant(self):
pkgset_phase = mock.Mock()