forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added nf-test for untarfiles (nf-core#6412)
* Added nf-test for untarfiles * Matched conda versions with docker/singularity using wave containers * Changed test name * Added deprecation message
- Loading branch information
Showing
8 changed files
with
471 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process UNTARFILES" | ||
script "../main.nf" | ||
process "UNTARFILES" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "untarfiles" | ||
|
||
test("test-untarfiles") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kraken2.tar.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test-untarfiles-subdirectories") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bcl/flowcell.tar.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.files[0][1].collect { file(it).name }.toSorted(), | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-untarfiles-onlyfiles") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
file(params.modules_testdata_base_path + 'generic/tar/hello.tar.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test-untarfiles-onlyfiles-stub") { | ||
options '-stub' | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
file(params.modules_testdata_base_path + 'generic/tar/hello.tar.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.