コード例 #1
0
 def test_06_start_atomic_repo_sync(self):
     '''
        start syncing the repo
     '''
     atomic_repo_version = RHUIManagerRepo.get_repo_version(
         RHUA, self.atomic_repo_name)
     RHUIManagerSync.sync_repo(
         RHUA,
         [Util.format_repo(self.atomic_repo_name, atomic_repo_version)])
コード例 #2
0
 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)
コード例 #3
0
 def test_09_wait_for_sync(self):
     '''
        wait until the repo is synced (takes a while)
     '''
     atomic_repo_version = RHUIManagerRepo.get_repo_version(
         RHUA, self.atomic_repo_name)
     RHUIManagerSync.wait_till_repo_synced(
         RHUA,
         [Util.format_repo(self.atomic_repo_name, atomic_repo_version)])
コード例 #4
0
 def _sync_cds(self, cdslist):
     """ Sync cds """
     if (not "RHUA" in self.rs.Instances.keys()) or len(self.rs.Instances["RHUA"]) < 1:
         raise nose.exc.SkipTest("can't test without RHUA!")
     try:
         RHUIManagerSync.sync_cds(self.rs.Instances["RHUA"][0], cdslist)
     except ExpectFailed:
         # The CDS is not available for syncing so most probably it's syncing right now
         # Trying to check the status
         Expect.enter(self.rs.Instances["RHUA"][0], "b")
         RHUIManager.quit(self.rs.Instances["RHUA"][0])
     self._sync_wait_cds(cdslist)
コード例 #5
0
 def test_11_sync_again(self):
     '''
        sync the repo again (workaround for RHBZ#1427190)
     '''
     atomic_repo_version = RHUIManagerRepo.get_repo_version(
         RHUA, self.atomic_repo_name)
     RHUIManagerSync.sync_repo(
         RHUA,
         [Util.format_repo(self.atomic_repo_name, atomic_repo_version)])
     RHUIManagerSync.wait_till_repo_synced(
         RHUA,
         [Util.format_repo(self.atomic_repo_name, atomic_repo_version)])
コード例 #6
0
    def test_06_sync_containers(self):
        '''
           sync the containers
        '''
        quay_repo_name = Util.safe_pulp_repo_name(self.container_quay["name"])
        docker_repo_name = Util.safe_pulp_repo_name(
            self.container_docker["name"])

        RHUIManagerSync.sync_repo(
            RHUA,
            [self.container_displayname, quay_repo_name, docker_repo_name])
        RHUIManagerSync.wait_till_repo_synced(
            RHUA,
            [self.container_displayname, quay_repo_name, docker_repo_name])
コード例 #7
0
 def test_05_add_upload_sync_stuff(self):
     '''
        add a custom and RH content repos to protect by a cli entitlement cert, upload rpm, sync
     '''
     RHUIManagerRepo.add_custom_repo(RHUA, CUSTOM_REPO, "", CUSTOM_PATH,
                                     "1", "y")
     RHUIManagerRepo.upload_content(
         RHUA, [CUSTOM_REPO], "%s/%s" % (CUSTOM_RPMS_DIR, self.custom_rpm))
     RHUIManagerRepo.add_rh_repo_by_repo(RHUA, [
         Util.format_repo(self.yum_repo_name, self.yum_repo_version,
                          self.yum_repo_kind)
     ])
     RHUIManagerSync.sync_repo(
         RHUA,
         [Util.format_repo(self.yum_repo_name, self.yum_repo_version)])
コード例 #8
0
 def _sync_repo(self, repolist):
     """ Sync repo """
     if (not "RHUA" in self.rs.Instances.keys()) or len(self.rs.Instances["RHUA"]) < 1:
         raise nose.exc.SkipTest("can't test without RHUA!")
     try:
         RHUIManagerSync.sync_repo(self.rs.Instances["RHUA"][0], repolist)
     except ExpectFailed:
         # The repo is not available for syncing so most probably it's syncing right now
         # Trying to check the status
         Expect.enter(self.rs.Instances["RHUA"][0], "b")
         RHUIManager.quit(self.rs.Instances["RHUA"][0])
     for repo in repolist:
         reposync = ["In Progress", "", ""]
         while reposync[0] in ["In Progress", "Never"]:
             time.sleep(10)
             reposync = RHUIManagerSync.get_repo_status(self.rs.Instances["RHUA"][0], repo)
         nose.tools.assert_equal(reposync[2], "Success")
コード例 #9
0
 def _sync_repo(self, repolist):
     """ Sync repo """
     if (not "RHUA" in self.rs.Instances.keys()) or len(self.rs.Instances["RHUA"]) < 1:
         raise nose.exc.SkipTest("can't test without RHUA!")
     try:
         RHUIManagerSync.sync_repo(self.rs.Instances["RHUA"][0], repolist)
     except ExpectFailed:
         # The repo is not available for syncing so most probably it's syncing right now
         # Trying to check the status
         Expect.enter(self.rs.Instances["RHUA"][0], "b")
         RHUIManager.quit(self.rs.Instances["RHUA"][0])
     for repo in repolist:
         reposync = ["In Progress", "", ""]
         while reposync[0] in ["In Progress", "Never"]:
             time.sleep(10)
             reposync = RHUIManagerSync.get_repo_status(self.rs.Instances["RHUA"][0], repo)
         nose.tools.assert_equal(reposync[2], "Success")
コード例 #10
0
 def _sync_wait_cds(self, cdslist):
     """ Sync CDS and wait """
     # waits for the cds sync conclusion
     for cds in cdslist:
         cdssync = ["UP", "In Progress", "", ""]
         while cdssync[1] == "In Progress":
             time.sleep(10)
             cdssync = RHUIManagerSync.get_cds_status(self.rs.Instances["RHUA"][0], cds)
         nose.tools.assert_equal(cdssync[3], "Success")
コード例 #11
0
 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)
コード例 #12
0
 def test_04_wait_till_repo_synced(self):
     '''wait until the repo is synced'''
     RHUIManagerSync.wait_till_repo_synced(
         RHUA,
         [Util.format_repo(self.yum_repo_name, self.yum_repo_version)])
コード例 #13
0
 def test_03_check_sync_started(self):
     '''ensure that the sync started'''
     RHUIManagerSync.check_sync_started(
         RHUA,
         [Util.format_repo(self.yum_repo_name, self.yum_repo_version)])
コード例 #14
0
 def test_02_sync_repo(self):
     '''sync a RH repo '''
     RHUIManagerSync.sync_repo(
         RHUA,
         [Util.format_repo(self.yum_repo_name, self.yum_repo_version)])
コード例 #15
0
 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)