def test_cli_inc_update_noapply(self): """@Test: Check if cli incremental update can be done without actually applying it @Feature: Incremental Update @Assert: Incremental update completed with no errors and Content view has a newer version """ # Get the content view versions and use the recent one. API always # returns the versions in ascending order so it is safe to assume the # last one in the list is the recent cv_versions = self.rhel_6_partial_cv.version # Get the applicable errata errata_list = self.get_applicable_errata(self.rhel_66_repo) self.assertGreater(len(errata_list), 0) # Apply incremental update using the first applicable errata ContentViewCLI.version_incremental_update({ u'content-view-version-id': cv_versions[-1].id, u'environment-ids': self.qe_lce.id, u'errata-ids': errata_list[0].id, }) # Re-read the content view to get the latest versions self.rhel_6_partial_cv = self.rhel_6_partial_cv.read() self.assertGreater( len(self.rhel_6_partial_cv.version), len(cv_versions) )
def test_positive_noapply_cli(self): """Check if cli incremental update can be done without actually applying it :id: f25b0919-74cb-4e2c-829e-482558990b3c :expectedresults: Incremental update completed with no errors and Content view has a newer version :CaseLevel: System """ # Get the content view versions and use the recent one. API always # returns the versions in ascending order so it is safe to assume the # last one in the list is the recent cv_versions = self.rhel_6_partial_cv.version # Get the applicable errata errata_list = self.get_applicable_errata(self.rhva_6_repo) self.assertGreater(len(errata_list), 0) # Apply incremental update using the first applicable errata ContentViewCLI.version_incremental_update({ u'content-view-version-id': cv_versions[-1].id, u'lifecycle-environment-ids': self.qe_lce.id, u'errata-ids': errata_list[0].id, }) # Re-read the content view to get the latest versions self.rhel_6_partial_cv = self.rhel_6_partial_cv.read() self.assertGreater( len(self.rhel_6_partial_cv.version), len(cv_versions) )
def test_positive_noapply_cli(self): """Check if cli incremental update can be done without actually applying it @Feature: Incremental Update @Assert: Incremental update completed with no errors and Content view has a newer version """ # Get the content view versions and use the recent one. API always # returns the versions in ascending order so it is safe to assume the # last one in the list is the recent cv_versions = self.rhel_6_partial_cv.version # Get the applicable errata errata_list = self.get_applicable_errata(self.rhel_66_repo) self.assertGreater(len(errata_list), 0) # Apply incremental update using the first applicable errata ContentViewCLI.version_incremental_update({ u'content-view-version-id': cv_versions[-1].id, u'environment-ids': self.qe_lce.id, u'errata-ids': errata_list[0].id, }) # Re-read the content view to get the latest versions self.rhel_6_partial_cv = self.rhel_6_partial_cv.read() self.assertGreater(len(self.rhel_6_partial_cv.version), len(cv_versions))
def test_positive_noapply_cli(module_manifest_org, module_cv, custom_repo, host, qe_lce): """Check if cli incremental update can be done without actually applying it :id: f25b0919-74cb-4e2c-829e-482558990b3c :expectedresults: Incremental update completed with no errors and Content view has a newer version :CaseLevel: System """ # Promote CV to new LCE versions = sorted(module_cv.read().version, key=lambda ver: ver.id) cvv = versions[-1].read() promote(cvv, qe_lce.id) # Read CV to pick up LCE ID and next_version module_cv = module_cv.read() # Get the content view versions and use the recent one. API should # return the versions in ascending order so assume the # last one in the list is the most recent cv_versions = module_cv.version # Get the applicable errata errata_list = get_applicable_errata(custom_repo) assert len(errata_list) > 0 # Apply incremental update using the first applicable errata ContentViewCLI.version_incremental_update({ 'content-view-version-id': cv_versions[-1].id, 'lifecycle-environment-ids': qe_lce.id, 'errata-ids': errata_list[0].id, }) # Re-read the content view to get the latest versions module_cv = module_cv.read() assert len(module_cv.version) > len(cv_versions)