コード例 #1
0
    def upload_mock_plugin(self, plugin_name, plugin_path=None):
        if not plugin_path:
            plugin_path = test_utils.get_resource(
                'plugins/{0}'.format(plugin_name))

        wagon_path = self._create_test_wagon(plugin_path)

        yaml_path = os.path.join(plugin_path, 'plugin.yaml')
        with utils.zip_files([wagon_path, yaml_path]) as zip_path:
            self.client.plugins.upload(zip_path)

        self._wait_for_execution_by_wf_name('install_plugin')
コード例 #2
0
    def upload_mock_plugin(self, plugin_name, plugin_path=None):
        self.logger.info('Starting uploading {0} from {1}...'.format(
            plugin_name, plugin_path))
        if not plugin_path:
            plugin_path = test_utils.get_resource(
                'plugins/{0}'.format(plugin_name))

        wagon_paths = self._get_or_create_wagon(plugin_path)
        for wagon_path in wagon_paths:
            yaml_path = os.path.join(plugin_path, 'plugin.yaml')
            with utils.zip_files([wagon_path, yaml_path]) as zip_path:
                self.client.plugins.upload(zip_path)
        self.logger.info('Finished uploading {0}...'.format(plugin_name))