Ejemplo n.º 1
0
def test_04_create_custom_repo():
    '''
        add a custom repo using a custom GPG key
    '''
    RHUIManagerRepo.add_custom_repo(
        RHUA,
        REPO,
        redhat_gpg="n",
        custom_gpg="/tmp/extra_rhui_files/test_gpg_key")
 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)])
 def test_04_add_repo(self):
     '''
        add a custom repo
     '''
     # custom GPG key can have a name, or it can be set to "nokey" (not used with the packages),
     # or it can be undefined altogether, in which case the packages are supposedly signed by RH
     try:
         if self.test["gpg_key"] == "nokey":
             custom_gpg = None
         else:
             custom_gpg = "/tmp/extra_rhui_files/%s/%s" % \
                          (self.test["repo_id"], self.test["gpg_key"])
         redhat_gpg = "n"
     except KeyError:
         custom_gpg = None
         redhat_gpg = "y"
     RHUIManagerRepo.add_custom_repo(RHUA,
                                     self.test["repo_id"],
                                     self.test["repo_name"],
                                     redhat_gpg=redhat_gpg,
                                     custom_gpg=custom_gpg)
Ejemplo n.º 4
0
 def test_02_create_3_custom_repos():
     '''create 3 custom repos (protected, unprotected, no RH GPG check) '''
     RHUIManagerRepo.add_custom_repo(RHUA, CUSTOM_REPOS[0], "",
                                     CUSTOM_PATHS[0], "1", "y")
     RHUIManagerRepo.add_custom_repo(RHUA, CUSTOM_REPOS[1], "",
                                     CUSTOM_PATHS[1], "1", "n")
     RHUIManagerRepo.add_custom_repo(RHUA, CUSTOM_REPOS[2], "",
                                     CUSTOM_PATHS[2], "1", "y", "", "n")
Ejemplo n.º 5
0
 def test_04_create_custom_repo():
     '''Create a custom repo for further testing (interactively; not currently supported by the CLI)'''
     RHUIManagerRepo.add_custom_repo(CONNECTION, CUSTOM_REPO_NAME, entitlement="n")
 def test_06_add_custom_repo():
     '''
        add a custom repo to protect by a client entitlement certificate
     '''
     RHUIManagerRepo.add_custom_repo(RHUA, "custom-enttest", "", "", "1",
                                     "y")