def test_11_check_repo_sync_status(self): ''' check if RH repos have been synced so RPMs can be installed from them ''' RHUIManagerSync.wait_till_repo_synced( RHUA, [Util.format_repo(self.yum_repo_name, self.yum_repo_version)]) # also wait for the publish Pulp task to complete (takes time in the case of large repos) RHUIManagerSync.wait_till_pulp_tasks_finish(RHUA)
def test_13_big_comps(): """import comps for the (big) RHEL 7Server repo and check if all its groups get processed""" # first force the RHUA to cache RHEL repodata # (using a recent 3.x AWS client RPM; remove this when such an RPM is common in RHEL 7 AMIs) Expect.expect_retval(RHUA, "yum -y update rh-amazon-rhui-client", timeout=60) Expect.expect_retval(RHUA, "yum repolist enabled", timeout=60) # get all groups from this repodata; using a wildcard as there's only one cached comps file original_comps_xml = "/var/cache/yum/x86_64/7Server/%s/*comps.xml" % BIG_REPO original_groups = Yummy.comps_xml_grouplist(RHUA, original_comps_xml, False) # create a custom repo for the 7Server repo, import the cached comps file RHUIManagerCLI.repo_create_custom(RHUA, BIG_REPO) RHUIManagerCLI.repo_add_comps(RHUA, BIG_REPO, original_comps_xml) # this can actually take a while to get fully processed, so better check for Pulp tasks RHUIManagerSync.wait_till_pulp_tasks_finish(RHUA) # get all groups from the imported metadata processed_comps_xml = Yummy.repodata_location(RHUA, BIG_REPO, "group") processed_groups = Yummy.comps_xml_grouplist(RHUA, processed_comps_xml, False) # compare the groups nose.tools.eq_(original_groups, processed_groups)
def test_12_wait_for_pulp_tasks(): ''' wait until the repo publish task is complete (takes extra time) ''' RHUIManagerSync.wait_till_pulp_tasks_finish(RHUA)