def test_11_delete_one_repo(self): '''remove the Red Hat repo''' RHUIManagerRepo.delete_repo( RHUA, [Util.format_repo(self.yum_repo_name, self.yum_repo_version)]) repo_list = RHUIManagerRepo.list(RHUA) nose.tools.ok_( Util.format_repo(self.yum_repo_name, self.yum_repo_version) not in repo_list, msg="The repo wasn't removed. Actual repolist: %s" % repo_list)
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_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)])
def test_12_check_repo_sync_status(self): ''' check if RH repos were synced to install rpm ''' RHUIManager.initial_run(connection) if self.rhua_os_version < 7: RHUIManagerSync.wait_till_repo_synced(connection, [ Util.format_repo(self.yum_repo1_name, self.yum_repo1_version) ]) else: RHUIManagerSync.wait_till_repo_synced(connection, [ Util.format_repo(self.yum_repo2_name, self.yum_repo2_version) ])
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_08_add_rh_repo_by_repository(self): '''Add a RH repo by repository''' RHUIManagerRepo.add_rh_repo_by_repo(connection, [ Util.format_repo(self.yum_repo_name, self.yum_repo_version, self.yum_repo_kind) ]) nose.tools.assert_not_equal(RHUIManagerRepo.list(connection), [])
def test_01_setup(self): '''do rhui-manager login, upload RH cert, add a repo to sync ''' RHUIManager.initial_run(connection) list = RHUIManagerEntitlements.upload_rh_certificate(connection) nose.tools.assert_not_equal(len(list), 0) RHUIManagerRepo.add_rh_repo_by_repo(connection, [ Util.format_repo(self.yum_repo_name, self.yum_repo_version, self.yum_repo_kind) ])
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)])
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_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)])
def test_12_add_rh_repo_by_product(self): '''add a Red Hat repo by the product that contains it, remove it''' RHUIManagerRepo.add_rh_repo_by_product(RHUA, [self.yum_repo_name]) 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) RHUIManagerRepo.delete_all_repos(RHUA) nose.tools.ok_(not RHUIManagerRepo.list(RHUA))
def test_05_add_repos_upload_rpm_sync(self): ''' add a custom and RH content repos to protect by a cli entitlement cert, upload rpm, sync ''' RHUIManagerRepo.add_custom_repo(connection, "custom-i386-x86_64", "", "custom/i386/x86_64", "1", "y") RHUIManagerRepo.upload_content( connection, ["custom-i386-x86_64"], "/tmp/extra_rhui_files/rhui-rpm-upload-test-1-1.noarch.rpm") RHUIManagerRepo.add_rh_repo_by_repo(connection, [ Util.format_repo(self.yum_repo1_name, self.yum_repo1_version, self.yum_repo1_kind), Util.format_repo(self.yum_repo2_name, self.yum_repo2_version, self.yum_repo1_kind) ]) RHUIManagerSync.sync_repo(connection, [ Util.format_repo(self.yum_repo1_name, self.yum_repo1_version), Util.format_repo(self.yum_repo2_name, self.yum_repo2_version) ])
def test_99_cleanup(self): '''remove the RH repo and cert''' RHUIManagerRepo.delete_repo( RHUA, [Util.format_repo(self.yum_repo_name, self.yum_repo_version)]) RHUIManager.remove_rh_certs(RHUA)
def test_02_sync_repo(self): '''sync a RH repo ''' RHUIManagerSync.sync_repo( connection, [Util.format_repo(self.yum_repo_name, self.yum_repo_version)])
def test_10_display_rh_repo(self): '''check detailed information on the Red Hat repo''' RHUIManagerRepo.check_detailed_information(RHUA, [ Util.format_repo(self.yum_repo_name, self.yum_repo_version), self.yum_repo_path ], [False], [True, None, True], 0)
def test_03_check_sync_started(self): '''ensure that sync started''' RHUIManagerSync.check_sync_started( connection, [Util.format_repo(self.yum_repo_name, self.yum_repo_version)])
def test_04_wait_till_repo_synced(self): '''wait until repo is synced''' RHUIManagerSync.wait_till_repo_synced( connection, [Util.format_repo(self.yum_repo_name, self.yum_repo_version)])