Skip to content

Commit

Permalink
Add test case for fail uncconected ExpressionTool
Browse files Browse the repository at this point in the history
  • Loading branch information
manabuishii authored and mr-c committed Aug 17, 2023
1 parent 5887ccf commit 4d8442a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
10 changes: 10 additions & 0 deletions conformance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3150,6 +3150,16 @@
}
tags: [ required, command_line_tool ]

- job: tests/empty.json
tool: tests/fail-unconnected-expressiontool.cwl
label: wf_step_access_undeclared_param_expressiontool
id: 258
doc: >-
Test that parameters that don't appear in the `run` process
inputs are not present in the input object used to run the expressiontool.
should_fail: true
tags: [ required, workflow ]

- $import: tests/string-interpolation/test-index.yaml

- $import: tests/conditionals/test-index.yaml
Expand Down
20 changes: 20 additions & 0 deletions tests/fail-unconnected-expressiontool.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class: Workflow
cwlVersion: v1.1
inputs:
inp1:
type: string
default: hello inp1
inp2:
type: string
default: hello inp2
outputs:
out:
type: string
outputSource: step1/out
steps:
step1:
in:
in: inp1
in2: inp2
out: [out]
run: fail-unspecified-input-expressiontool.cwl
18 changes: 18 additions & 0 deletions tests/fail-unspecified-input-expressiontool.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cwlVersion: v1.0
class: ExpressionTool

requirements:
InlineJavascriptRequirement: {}

inputs:
in:
type: string

outputs:
out:
type: string

expression: |
${
return {"out": inputs.in +" "+inputs.in2};
}

0 comments on commit 4d8442a

Please sign in to comment.