Пример #1
0
 def test_22_create_cli_config_rpm():
     '''create a client configuration RPM'''
     RHUIManagerCLI.client_rpm(
         RHUA, ["/tmp/%s.key" % CLI_CFG[0],
                "/tmp/%s.crt" % CLI_CFG[0]], CLI_CFG, "/tmp",
         [CUSTOM_REPOS[0]], "_none_")
     # check if the rpm was created
     conf_rpm = "/tmp/%s-%s/build/RPMS/noarch/%s-%s-%s.noarch.rpm" % tuple(
         CLI_CFG[:2] + CLI_CFG)
     Expect.expect_retval(RHUA, "test -f %s" % conf_rpm)
Пример #2
0
 def test_12_additional_group(self):
     """import a comps file containing one more group and expect the group to be added"""
     # and nothing lost...
     # import the "updated" comps file
     repo = self.repo_with_mod_groups
     modified_comps_xml = "/tmp/extra_rhui_files/%s/mod-comps.xml" % repo
     RHUIManagerCLI.repo_add_comps(RHUA, repo, modified_comps_xml)
     # create a client configuration RPM, install it on the client
     RHUIManagerCLI.client_rpm(RHUA, [repo], [repo, "2.1"], "/tmp")
     Util.remove_rpm(CLI, [self.test_repos[1]])
     Util.install_pkg_from_rhua(RHUA,
                                CLI,
                                "/tmp/%s-2.1/build/RPMS/noarch/%s-2.1-1.noarch.rpm" % \
                                (repo, repo))
     # compare client's available groups with the *original* comps file,
     # expecting all the original groups plus the extra group
     groups_on_client = Yummy.yum_grouplist(CLI)
     original_comps_xml = "/tmp/extra_rhui_files/%s/comps.xml" % repo
     groups_in_xml = Yummy.comps_xml_grouplist(RHUA, original_comps_xml)
     # trick: put the extra group to the right place in the sorted list
     insort(groups_in_xml, self.test_group_mod)
     nose.tools.eq_(groups_on_client, groups_in_xml)
     nose.tools.ok_(self.test_group_mod in groups_on_client)
Пример #3
0
 def test_08_create_cli_config_rpm(self):
     '''
     create an entitlement certificate and a client configuration RPM (in one step)
     '''
     RHUIManagerCLI.client_rpm(RHUA, [self.repo_label], [CONF_RPM_NAME],
                               "/tmp")
Пример #4
0
 def test_04_create_cli_config_rpms(self):
     """create client configuration RPMs for the repos"""
     for repo in self.test_repos:
         RHUIManagerCLI.client_rpm(RHUA, [repo], [repo], "/tmp")