def test_init_with_create_manifest(self, mock_export_utils): mock_export_utils.return_value = 'foo' config = PluginCallConfiguration({constants.CREATE_PULP_MANIFEST: True}, None) step = publish.ExportRepoPublisher( self.publisher.get_repo(), self.publisher.get_conduit(), config, YUM_DISTRIBUTOR_ID, working_dir=self.working_dir ) self.assertTrue(isinstance(step.children[-2], CreatePulpManifestStep))
def test_init_with_date_and_iso(self, mock_export_utils): mock_export_utils.return_value = 'foo' config = PluginCallConfiguration(None, None) step = publish.ExportRepoPublisher(self.publisher.get_repo(), self.publisher.get_conduit(), config, YUM_DISTRIBUTOR_ID) self.assertTrue(isinstance(step.children[-4], publish.CopyDirectoryStep)) self.assertTrue(isinstance(step.children[-3], publish.GenerateListingFileStep)) self.assertTrue(isinstance(step.children[-2], publish.CreateIsoStep)) self.assertTrue(isinstance(step.children[-1], publish.AtomicDirectoryPublishStep)) self.assertEquals(step.children[0].association_filters, 'foo') self.assertEquals(step.children[1].association_filters, 'foo')
def test_init_with_date_filter_and_export_dir(self, mock_export_utils): mock_export_utils.return_value = 'foo' export_dir = 'flux' config = PluginCallConfiguration(None, {constants.EXPORT_DIRECTORY_KEYWORD: export_dir}) step = publish.ExportRepoPublisher(self.publisher.get_repo(), self.publisher.get_conduit(), config, YUM_DISTRIBUTOR_ID, working_dir=self.working_dir) self.assertTrue(isinstance(step.children[0], publish.PublishRpmAndDrpmStepIncremental)) self.assertTrue(isinstance(step.children[1], publish.PublishErrataStepIncremental)) self.assertTrue(isinstance(step.children[2], publish.CopyDirectoryStep)) self.assertTrue(isinstance(step.children[3], publish.GenerateListingFileStep)) self.assertEquals(step.children[0].association_filters, 'foo') self.assertEquals(step.children[1].association_filters, 'foo')