Skip to content

Commit 253a250

Browse files
author
Dennis Kennetz
committed
Added a test to look for dockerImageId in tool, should exit non-zero. This currently has no test coverage.
1 parent c638369 commit 253a250

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/debian_image_id.cwl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env cwl-runner
2+
cwlVersion: v1.0
3+
class: CommandLineTool
4+
5+
requirements:
6+
DockerRequirement:
7+
dockerImageId: 'debian.img'
8+
9+
inputs:
10+
message: string
11+
12+
outputs: []
13+
14+
baseCommand: echo

tests/test_singularity.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,9 @@ def test_singularity_local(tmp_path):
8181
file_in_dir = os.listdir(os.getcwd())
8282
assert result_code == 0
8383

84+
@needs_singularity
85+
def test_singularity_docker_image_id_in_tool():
86+
result_code, _, stderr = get_main_output(
87+
['--singularity', '--default-container',
88+
get_data("tests/debian_image_id.cwl"), "--message", "hello"])
89+
assert result_code != 0

0 commit comments

Comments
 (0)