Skip to content

Commit 7751643

Browse files
author
Peter Amstutz
committed
Conformance tests for default value behavior.
1 parent 345c449 commit 7751643

File tree

4 files changed

+78
-2
lines changed

4 files changed

+78
-2
lines changed

v1.0/conformance_test_v1.0.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
- job: v1.0/null-expression1-job.json
127127
tool: v1.0/null-expression1-tool.cwl
128128
output:
129-
output: 2
129+
output: 1
130130
doc: Test explicitly passing null to Any type inputs with default values.
131131

132132
- job: v1.0/null-expression2-job.json
@@ -300,7 +300,17 @@
300300
- job: v1.0/empty.json
301301
output: {count_output: 16}
302302
tool: v1.0/count-lines9-wf.cwl
303-
doc: Test default value on input parameter
303+
doc: Test default value on step input parameter
304+
305+
- job: v1.0/empty.json
306+
output: {count_output: 16}
307+
tool: v1.0/count-lines11-wf.cwl
308+
doc: Test use default value on step input parameter with null source
309+
310+
- job: v1.0/cat-job.json
311+
output: {count_output: 1}
312+
tool: v1.0/count-lines11-wf.cwl
313+
doc: Test default value on step input parameter overridden by provided source
304314

305315
- job: v1.0/revsort-job.json
306316
output:

v1.0/v1.0/count-lines11-wf.cwl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env cwl-runner
2+
class: Workflow
3+
cwlVersion: v1.0
4+
5+
inputs:
6+
file1: File?
7+
8+
outputs:
9+
count_output:
10+
type: int
11+
outputSource: step2/output
12+
13+
steps:
14+
step1:
15+
run: wc-tool.cwl
16+
in:
17+
file1:
18+
source: file1
19+
default:
20+
class: File
21+
location: whale.txt
22+
out: [output]
23+
24+
step2:
25+
run: parseInt-tool.cwl
26+
in:
27+
file1: step1/output
28+
out: [output]

v1.1.0-dev1/conformance_test_v1.1.0-dev1.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,16 @@
313313
tool: v1.1.0-dev1/count-lines9-wf.cwl
314314
doc: Test default value on input parameter
315315

316+
- job: v1.1.0-dev1/empty.json
317+
output: {count_output: 16}
318+
tool: v1.1.0-dev1/count-lines11-wf.cwl
319+
doc: Test use default value on step input parameter with null source
320+
321+
- job: v1.1.0-dev1/cat-job.json
322+
output: {count_output: 1}
323+
tool: v1.1.0-dev1/count-lines11-wf.cwl
324+
doc: Test default value on step input parameter overridden by provided source
325+
316326
- job: v1.1.0-dev1/revsort-job.json
317327
output:
318328
output:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env cwl-runner
2+
class: Workflow
3+
cwlVersion: v1.1.0-dev1
4+
5+
inputs:
6+
file1: File?
7+
8+
outputs:
9+
count_output:
10+
type: int
11+
outputSource: step2/output
12+
13+
steps:
14+
step1:
15+
run: wc-tool.cwl
16+
in:
17+
file1:
18+
source: file1
19+
default:
20+
class: File
21+
location: whale.txt
22+
out: [output]
23+
24+
step2:
25+
run: parseInt-tool.cwl
26+
in:
27+
file1: step1/output
28+
out: [output]

0 commit comments

Comments
 (0)