Skip to content

Commit 0b1919f

Browse files
authored
Added test of optional input in a step with scatter par (#63)
1 parent 4653247 commit 0b1919f

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

conformance_tests.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,6 +1920,15 @@
19201920
doc: Test optional integer workflow inputs (unspecified)
19211921
tags: [ workflow, inline_javascript, expression_tool ]
19221922

1923+
- tool: tests/optional-input-scatter.cwl
1924+
job: tests/scatter-job1.json
1925+
output:
1926+
out: ["foo one", "foo two", "foo three", "foo four"]
1927+
id: optional_input_scatter
1928+
doc: |
1929+
Test optional step input with single scatter parameter
1930+
tags: [ scatter, workflow ]
1931+
19231932
- job: tests/io-int.json
19241933
output: {"o": 10}
19251934
tool: tests/io-int-default-wf.cwl

tests/optional-input-scatter.cwl

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env cwl-runner
2+
cwlVersion: v1.3.0-dev1
3+
class: Workflow
4+
inputs:
5+
inp: string[]
6+
outputs:
7+
out:
8+
type: string[]
9+
outputSource: step1/echo_out
10+
11+
requirements:
12+
- class: ScatterFeatureRequirement
13+
14+
steps:
15+
step1:
16+
in:
17+
echo_in: inp
18+
out: [echo_out]
19+
scatter: echo_in
20+
run:
21+
class: CommandLineTool
22+
inputs:
23+
echo_in:
24+
type: string
25+
inputBinding: {}
26+
input_2:
27+
type: File?
28+
inputBinding: {}
29+
outputs:
30+
echo_out:
31+
type: string
32+
outputBinding:
33+
glob: "step1_out"
34+
loadContents: true
35+
outputEval: $(self[0].contents)
36+
baseCommand: "echo"
37+
arguments:
38+
- "-n"
39+
- "foo"
40+
stdout: "step1_out"

0 commit comments

Comments
 (0)