diff --git a/src/ert/config/queue_config.py b/src/ert/config/queue_config.py index a03b94bf876..f52ccd37018 100644 --- a/src/ert/config/queue_config.py +++ b/src/ert/config/queue_config.py @@ -256,6 +256,7 @@ class QueueConfig: max_submit: int = 1 queue_system: QueueSystem = QueueSystem.LOCAL queue_options: QueueOptions = field(default_factory=QueueOptions) + queue_options_test_run: QueueOptions = field(default_factory=LocalQueueOptions) stop_long_running: bool = False @no_type_check @@ -299,6 +300,7 @@ def from_dict(cls, config_dict: ConfigDict) -> QueueConfig: ) queue_options = _all_validated_queue_options[selected_queue_system] + queue_options_test_run = _all_validated_queue_options[QueueSystem.LOCAL] queue_options.add_global_queue_options(config_dict) if queue_options.project_code is None: @@ -353,6 +355,7 @@ def from_dict(cls, config_dict: ConfigDict) -> QueueConfig: max_submit, selected_queue_system, queue_options, + queue_options_test_run, stop_long_running=stop_long_running, ) @@ -362,7 +365,8 @@ def create_local_copy(self) -> QueueConfig: self.realization_memory, self.max_submit, QueueSystem.LOCAL, - self.queue_options, + self.queue_options_test_run, + self.queue_options_test_run, stop_long_running=self.stop_long_running, ) diff --git a/tests/integration_tests/test_cli.py b/tests/integration_tests/test_cli.py index b789469c4da..9e07d2e769f 100644 --- a/tests/integration_tests/test_cli.py +++ b/tests/integration_tests/test_cli.py @@ -41,6 +41,13 @@ def test_bad_config_error_message(tmp_path): run_cli(TEST_RUN_MODE, "--disable-monitor", str(tmp_path / "test.ert")) +def test_test_run_on_lsf_configuration_works_with_no_errors(tmp_path): + (tmp_path / "test.ert").write_text( + "NUM_REALIZATIONS 1\nQUEUE_SYSTEM LSF", encoding="utf-8" + ) + run_cli(TEST_RUN_MODE, "--disable-monitor", str(tmp_path / "test.ert")) + + @pytest.mark.parametrize( "mode", [ diff --git a/tests/unit_tests/config/test_queue_config.py b/tests/unit_tests/config/test_queue_config.py index 80e812d71f6..73744f17d22 100644 --- a/tests/unit_tests/config/test_queue_config.py +++ b/tests/unit_tests/config/test_queue_config.py @@ -24,7 +24,9 @@ def test_create_local_copy_is_a_copy_with_local_queue_system(): queue_config = QueueConfig(queue_system=QueueSystem.LSF) assert queue_config.queue_system == QueueSystem.LSF - assert queue_config.create_local_copy().queue_system == QueueSystem.LOCAL + local_queue_config = queue_config.create_local_copy() + assert local_queue_config.queue_system == QueueSystem.LOCAL + assert isinstance(local_queue_config.queue_options, LocalQueueOptions) @pytest.mark.parametrize("value", [True, False])