def test_01_setup(self):
     '''log in to rhui-manager, upload RH cert, add a repo to sync '''
     RHUIManager.initial_run(RHUA)
     entlist = RHUIManagerEntitlements.upload_rh_certificate(RHUA)
     nose.tools.assert_not_equal(len(entlist), 0)
     RHUIManagerRepo.add_rh_repo_by_repo(RHUA, [
         Util.format_repo(self.yum_repo_name, self.yum_repo_version,
                          self.yum_repo_kind)
     ])
Exemple #2
0
 def test_09_add_rh_repo_by_repo(self):
     '''add a Red Hat repo by its name'''
     RHUIManagerRepo.add_rh_repo_by_repo(RHUA, [
         Util.format_repo(self.yum_repo_name, self.yum_repo_version,
                          self.yum_repo_kind)
     ])
     repo_list = RHUIManagerRepo.list(RHUA)
     nose.tools.ok_(Util.format_repo(self.yum_repo_name,
                                     self.yum_repo_version) in repo_list,
                    msg="The repo wasn't added. Actual repolist: %s" %
                    repo_list)
 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)])