def setUp(self):
        self.config = {'timeout': 1, 'interval': 2}
        self.mock_config = mock.MagicMock()
        self.mock_config.checker.return_value = self.config

        self.checkers = [
            mock.MagicMock(checker_name=1),
            mock.MagicMock(checker_name=2)
        ]

        self.verifier = FuelUpgradeVerify(self.mock_config,
                                          checkers=self.checkers)
Example #2
0
    def __init__(self, *args, **kwargs):
        super(DockerUpgrader, self).__init__(*args, **kwargs)

        self.working_directory = self.config.working_directory

        utils.create_dir_if_not_exists(self.working_directory)

        self.docker_client = docker.Client(
            base_url=self.config.docker['url'],
            version=self.config.docker['api_version'],
            timeout=self.config.docker['http_timeout'])

        self.new_release_containers = self.make_new_release_containers_list()
        self.cobbler_config_path = self.config.cobbler_config_path.format(
            working_directory=self.working_directory)
        self.upgrade_verifier = FuelUpgradeVerify(self.config)

        self.from_version = self.config.from_version
        self.supervisor = SupervisorClient(self.config, self.from_version)