Ejemplo n.º 1
0
def test_load_full_client(configuration: Configuration) -> None:
    """
    must load full client if no settings set
    """
    configuration.set("web", "host", "localhost")
    configuration.set("web", "port", "8080")
    assert isinstance(Client.load(configuration), WebClient)
Ejemplo n.º 2
0
    def __init__(self, args: argparse.Namespace, architecture: str,
                 configuration: Configuration) -> None:
        """
        default constructor
        :param args: command line args
        :param architecture: repository architecture
        :param configuration: configuration instance
        """
        self.path = Path(
            f"{args.lock}_{architecture}") if args.lock is not None else None
        self.force = args.force
        self.unsafe = args.unsafe

        self.root = Path(configuration.get("repository", "root"))
        self.reporter = Client() if args.no_report else Client.load(
            configuration)
Ejemplo n.º 3
0
    def __init__(self, architecture: str,
                 configuration: Configuration) -> None:
        self.logger = logging.getLogger("builder")
        self.architecture = architecture
        self.configuration = configuration

        self.aur_url = configuration.get("alpm", "aur_url")
        self.name = configuration.get("repository", "name")

        self.paths = RepositoryPaths(
            configuration.getpath("repository", "root"), architecture)
        self.paths.create_tree()

        self.ignore_list = configuration.getlist("build", "ignore_packages")
        self.pacman = Pacman(configuration)
        self.sign = GPG(architecture, configuration)
        self.repo = Repo(self.name, self.paths, self.sign.repository_sign_args)
        self.reporter = Client.load(configuration)
Ejemplo n.º 4
0
def test_load_dummy_client(configuration: Configuration) -> None:
    """
    must load dummy client if no settings set
    """
    assert isinstance(Client.load(configuration), Client)