def setUp(self):
        super().setUp()
        test_utils.setup()

        executor._process_creator = _MockProcessWrapper
        self.executor_service = ExecutionService(AnyUserAuthorizer(), _IdGeneratorMock())

        self.feature = FileDownloadFeature(UserFileStorage(b'123456'), test_utils.temp_folder)
        self.feature.subscribe(self.executor_service)
    def setUp(self):
        super().setUp()
        test_utils.setup()

        executor._process_creator = _MockProcessWrapper
        self.executor_service = ExecutionService(_IdGeneratorMock())

        self.feature = FileDownloadFeature(UserFileStorage(b'123456'), test_utils.temp_folder)
        self.feature.subscribe(self.executor_service)
    def setUp(self):
        test_utils.setup()

        executor._process_creator = _MockProcessWrapper

        self.logging_service = ExecutionLoggingService(test_utils.temp_folder, LogNameCreator())
        self.executor_service = ExecutionService(_IdGeneratorMock())

        self.controller = ExecutionLoggingController(self.executor_service, self.logging_service)
        self.controller.start()
Beispiel #4
0
    def setUp(self) -> None:
        test_utils.setup()

        executor._process_creator = _MockProcessWrapper
        self.executor_service = ExecutionService(_IdGeneratorMock())

        self.file_download_feature = file_download_feature.FileDownloadFeature(
            UserFileStorage(b'123456'), test_utils.temp_folder)
        self.file_download_feature.subscribe(self.executor_service)

        self.images = []
Beispiel #5
0
    def setUp(self):
        test_utils.setup()

        executor._process_creator = _MockProcessWrapper

        authorizer = Authorizer([], [], [], EmptyGroupProvider())
        self.logging_service = ExecutionLoggingService(test_utils.temp_folder, LogNameCreator(), authorizer)
        self.executor_service = ExecutionService(_IdGeneratorMock())

        self.controller = ExecutionLoggingController(self.executor_service, self.logging_service)
        self.controller.start()
Beispiel #6
0
    def setUp(self):
        super().setUp()
        self.id_generator = _IdGeneratorMock()
        self.exec_services = []
        self.processes = {}

        def create_process(executor, command, working_directory):
            wrapper = _MockProcessWrapper(executor, command, working_directory)
            self.processes[self.get_last_id()] = wrapper
            return wrapper

        executor._process_creator = create_process
    def setUp(self):
        super().setUp()
        self.id_generator = _IdGeneratorMock()
        self.exec_services = []
        self.processes = {}

        def create_process(executor, command, working_directory):
            wrapper = _MockProcessWrapper(executor, command, working_directory)
            self.processes[self.get_last_id()] = wrapper
            return wrapper

        executor._process_creator = create_process
    def setUp(self):
        super().setUp()
        self.id_generator = _IdGeneratorMock()
        self.authorizer = Authorizer(ANY_USER, [], [], EmptyGroupProvider())
        self.exec_services = []
        self.processes = {}

        def create_process(executor, command, working_directory,
                           env_variables):
            wrapper = _MockProcessWrapper(executor, command, working_directory,
                                          env_variables)
            self.processes[self.get_last_id()] = wrapper
            return wrapper

        executor._process_creator = create_process
    def setUp(self) -> None:
        super().setUp()

        def create_process(executor, command, working_directory,
                           env_variables):
            return _MockProcessWrapper(executor, command, working_directory,
                                       env_variables)

        executor._process_creator = create_process

        authorizer = Authorizer([ANY_USER], ['admin_user'], ['history_user'],
                                [], EmptyGroupProvider())
        self.executor_service = ExecutionService(authorizer,
                                                 _IdGeneratorMock())

        self.execution_id = _start(self.executor_service,
                                   self.owner_user.user_id)

        self.script_cleaned = False