def test_07_assert_nonexisten_unit_uninstall(self): unit = {'name': '__NO_SUCH_UNIT__'} rpm = RpmUnit(unit, relevant_data_keys=unit.keys()) with self.pulp.asserting(True): task_reports = [ consumer.uninstall_unit(self.pulp, unit, 'rpm') for consumer in self.consumers ] Task.wait_for_reports(self.pulp, task_reports)
def test_07_assert_unit_install(self): unit = {'name': 'pike'} rpm = RpmUnit(unit, relevant_data_keys=unit.keys()) with self.pulp.asserting(True): response = self.consumer.install_unit(self.pulp, unit, 'rpm') Task.wait_for_report(self.pulp, response) assert rpm in RpmUnit.list( self.consumer.cli), "rpm %s not installed on %s" % (rpm, self.consumer)
def test_06_assert_nonexisten_unit_install(self): # https://bugzilla.redhat.com/show_bug.cgi?id=1062725 # TODO parse callreport,taskreport and assert that in progress report result is false unit = {'name': '__NO_SUCH_UNIT__'} rpm = RpmUnit(unit, relevant_data_keys=unit.keys()) with self.pulp.asserting(True): task_reports = [ consumer.install_unit(self.pulp, unit, 'rpm') for consumer in self.consumers ] Task.wait_for_reports(self.pulp, task_reports)
def test_04_assert_unit_install(self): unit = {'name': 'pike'} rpm = RpmUnit(unit, relevant_data_keys=unit.keys()) with self.pulp.asserting(True): task_reports = [ consumer.install_unit(self.pulp, unit, 'rpm') for consumer in self.consumers ] Task.wait_for_reports(self.pulp, task_reports) for consumer in self.consumers: assert rpm in RpmUnit.list( consumer.cli), "rpm %s not installed on %s" % (rpm, consumer)