Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for InitialWorkDir contents to be non-writable #621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions v1.1.0-dev1/conformance_test_v1.1.0-dev1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,11 @@
tool: v1.1.0-dev1/recursive-input-directory.cwl
doc: Test if a writable input directory is recursivly copied and writable

- doc: Test that directories inside initial working directory are not writable by default
job: v1.1.0-dev1/empty.json
tool: v1.1.0-dev1/iwdr_listing_non_writable.cwl
should_fail: true

- output:
out: "t\n"
job: v1.1.0-dev1/empty.json
Expand Down
40 changes: 40 additions & 0 deletions v1.1.0-dev1/v1.1.0-dev1/iwdr_listing_non_writable.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.1.0-dev1
class: Workflow

inputs: []
outputs:
outfile:
type: File
outputSource: second/outfile

steps:
first:
run:
class: CommandLineTool
baseCommand: [ mkdir, directory ]
inputs: []
outputs:
dir:
type: Directory
outputBinding: { glob: directory }
in: {}
out: [ dir ]

second:
run:
class: CommandLineTool
baseCommand: [ touch, directory/file ]
requirements:
InitialWorkDirRequirement:
listing:
- entry: $(inputs.dir)
inputs:
dir: Directory
outputs:
outfile:
type: File
outputBinding: { glob: directory/file }

in: { dir: first/dir }
out: [ outfile ]