示例#1
0
 def test_08_install_cli_rpm(self):
     '''
        install the client configuration RPM
     '''
     if not self.cli_supported:
         raise nose.exc.SkipTest("Not supported on RHEL %s" %
                                 self.cli_os_version)
     Util.install_pkg_from_rhua(RHUA, CLI, CONF_RPM_PATH)
     # restart the docker service for the configuration to take effect
     # (only clients running the docker service)
     Util.restart_if_present(CLI, "docker")
示例#2
0
 def test_99_cleanup(self):
     '''
        remove the containers from the client and the RHUA, uninstall HAProxy and CDS
     '''
     if self.cli_supported:
         Expect.expect_retval(CLI, "docker rm -f $(docker ps -a -f ancestor=%s -q)" % \
                              self.container_id)
         for container in [
                 self.container_id,
                 Util.safe_pulp_repo_name(self.container_quay["name"]),
                 Util.safe_pulp_repo_name(self.container_docker["name"])
         ]:
             Expect.expect_retval(CLI, "docker rmi %s" % container)
         Util.remove_rpm(CLI, [CONF_RPM_NAME])
         Util.restart_if_present(CLI, "docker")
     Expect.expect_retval(RHUA, "rm -rf /tmp/%s*" % CONF_RPM_NAME)
     RHUIManagerRepo.delete_all_repos(RHUA)
     if not getenv("RHUISKIPSETUP"):
         RHUIManagerInstance.delete_all(RHUA, "loadbalancers")
         RHUIManagerInstance.delete_all(RHUA, "cds")