コード例 #1
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")
コード例 #2
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")