From d748c4f223ab792ddf3de3854ec4a92ff493120a Mon Sep 17 00:00:00 2001 From: "Yngve S. Kristiansen" Date: Mon, 7 Oct 2024 08:17:59 +0200 Subject: [PATCH] fixups --- .../snake_oil/everest/model/snake_oil_torque.yml | 11 +++++------ tests/everest/test_res_initialization.py | 16 ++++++---------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/tests/everest/test_data/snake_oil/everest/model/snake_oil_torque.yml b/tests/everest/test_data/snake_oil/everest/model/snake_oil_torque.yml index 6da52c9f3bc..0cef68e396a 100644 --- a/tests/everest/test_data/snake_oil/everest/model/snake_oil_torque.yml +++ b/tests/everest/test_data/snake_oil/everest/model/snake_oil_torque.yml @@ -49,14 +49,13 @@ simulator: max_runtime: 3600 queue_system: torque name: normal - qsub_cmd: "qsub" - qstat_cmd: "qstat" - qdel_cmd: "qdel" - cluster_label: "testing_it" - memory_per_job: "100mb" + qsub_cmd: qsub + qstat_cmd: qstat + qdel_cmd: qdel + memory_per_job: 100mb keep_qsub_output: 1 submit_sleep: 0.5 - project_code: "snake_oil_pc" + project_code: snake_oil_pc environment: simulation_folder: simulations diff --git a/tests/everest/test_res_initialization.py b/tests/everest/test_res_initialization.py index f4b6c3daf44..66529bb80b1 100644 --- a/tests/everest/test_res_initialization.py +++ b/tests/everest/test_res_initialization.py @@ -278,10 +278,8 @@ def test_snake_everest_to_ert_torque(): ("TORQUE", "QSUB_CMD", "qsub"), ("TORQUE", "QSTAT_CMD", "qstat"), ("TORQUE", "QDEL_CMD", "qdel"), - ("TORQUE", "QUEUE", "snake_queue"), - ("TORQUE", "CLUSTER_LABEL", "testing_it"), - ("TORQUE", "NUM_NODES", 1), - ("TORQUE", "MEMORY_PER_JOB", "2gb"), + ("TORQUE", "QUEUE", "normal"), + ("TORQUE", "MEMORY_PER_JOB", "100mb"), ("TORQUE", "KEEP_QSUB_OUTPUT", 1), ("TORQUE", "SUBMIT_SLEEP", 0.5), ("TORQUE", "PROJECT_CODE", "snake_oil_pc"), @@ -298,21 +296,19 @@ def test_snake_everest_to_ert_torque(): qc = ert_config.queue_config qo = qc.queue_options assert qc.queue_system == "TORQUE" - assert qo.driver_options == { + assert {k: v for k, v in qo.driver_options.items() if v is not None} == { "project_code": "snake_oil_pc", "qsub_cmd": "qsub", - "job_prefix": None, "qstat_cmd": "qstat", "qdel_cmd": "qdel", - "memory_per_job": "2gb", + "memory_per_job": "100mb", "num_cpus_per_node": 1, "num_nodes": 1, - "cluster_label": "testing_it", "keep_qsub_output": True, - "queue_name": "snake_queue", + "queue_name": "normal", } - create_driver(ert_config.queue_config) + driver = create_driver(ert_config.queue_config) @patch.dict("os.environ", {"USER": "NO_USERNAME"})