Skip to content

Commit 1ba6194

Browse files
committed
Issue #27 : Added tests
1 parent 4ddf872 commit 1ba6194

File tree

1 file changed

+56
-10
lines changed

1 file changed

+56
-10
lines changed

test/test_workflows.py

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,32 +180,27 @@ def test_run_job_success(cli_runner, cleanup, cwl_file, inputs):
180180
[
181181
# The description file is malformed: class attribute is unknown
182182
(
183-
"test/workflows/malformed_description/description_malformed_class.cwl",
184-
[],
183+
"test/workflows/malformed_description/description_malformed_class.cwl", [],
185184
"`class`containsundefinedreferenceto",
186185
),
187186
# The description file is malformed: baseCommand is unknown
188187
(
189-
"test/workflows/malformed_description/description_malformed_command.cwl",
190-
[],
188+
"test/workflows/malformed_description/description_malformed_command.cwl", [],
191189
"invalidfield`baseComand`",
192190
),
193191
# The description file points to a non-existent file (subworkflow)
194192
(
195-
"test/workflows/bad_references/reference_doesnotexists.cwl",
196-
[],
193+
"test/workflows/bad_references/reference_doesnotexists.cwl", [],
197194
"Nosuchfileordirectory",
198195
),
199196
# The description file points to another file point to it (circular dependency)
200197
(
201-
"test/workflows/bad_references/reference_circular1.cwl",
202-
[],
198+
"test/workflows/bad_references/reference_circular1.cwl", [],
203199
"Recursingintostep",
204200
),
205201
# The description file points to itself (another circular dependency)
206202
(
207-
"test/workflows/bad_references/reference_circular1.cwl",
208-
[],
203+
"test/workflows/bad_references/reference_circular2.cwl", [],
209204
"Recursingintostep",
210205
),
211206
# The configuration file is malformed: the hints are overridden more than once
@@ -216,6 +211,57 @@ def test_run_job_success(cli_runner, cleanup, cwl_file, inputs):
216211
],
217212
"Failedtovalidatetheparameter",
218213
),
214+
# The core resource requirements are wrong: coresMin is higher than coresMax value
215+
(
216+
"test/workflows/resource_requirements/bad_cores/clt_bad_cores.cwl", [],
217+
"RequirementValidationError"
218+
),
219+
(
220+
"test/workflows/resource_requirements/bad_cores/step_bad_cores.cwl", [],
221+
"RequirementValidationError"
222+
),
223+
(
224+
"test/workflows/resource_requirements/bad_cores/step_run_bad_cores.cwl", [],
225+
"RequirementValidationError"
226+
),
227+
(
228+
"test/workflows/resource_requirements/bad_cores/wf_bad_cores.cwl", [],
229+
"RequirementValidationError"
230+
),
231+
# The ram resource requirements are wrong: ramMin is higher than ramMax value
232+
(
233+
"test/workflows/resource_requirements/bad_ram/clt_bad_ram.cwl", [],
234+
"RequirementValidationError"
235+
),
236+
(
237+
"test/workflows/resource_requirements/bad_ram/step_bad_ram.cwl", [],
238+
"RequirementValidationError"
239+
),
240+
(
241+
"test/workflows/resource_requirements/bad_ram/step_run_bad_ram.cwl", [],
242+
"RequirementValidationError"
243+
),
244+
(
245+
"test/workflows/resource_requirements/bad_ram/wf_bad_ram.cwl", [],
246+
"RequirementValidationError"
247+
),
248+
# The resource requirements contains conflicts
249+
(
250+
"test/workflows/resource_requirements/resource_conflicts/cores_conflict_wf_step.cwl", [],
251+
"RequirementValidationError"
252+
),
253+
(
254+
"test/workflows/resource_requirements/resource_conflicts/cores_conflict_wf_step_run.cwl", [],
255+
"RequirementValidationError"
256+
),
257+
(
258+
"test/workflows/resource_requirements/resource_conflicts/ram_conflict_wf_step.cwl", [],
259+
"RequirementValidationError"
260+
),
261+
(
262+
"test/workflows/resource_requirements/resource_conflicts/ram_conflict_wf_step_run.cwl", [],
263+
"RequirementValidationError"
264+
)
219265
],
220266
)
221267
def test_run_job_validation_failure(

0 commit comments

Comments
 (0)