Skip to content

Commit

Permalink
Add untar nf-tests (nf-core#4137)
Browse files Browse the repository at this point in the history
* Added unzip nf-tests

* Added unzip nf-tests tests update

---------

Co-authored-by: Edmund Miller <[email protected]>
Co-authored-by: Maxime U Garcia <[email protected]>
  • Loading branch information
3 people authored Nov 10, 2023
1 parent 2680fb6 commit 8d23e7f
Show file tree
Hide file tree
Showing 4 changed files with 592 additions and 4 deletions.
77 changes: 77 additions & 0 deletions modules/nf-core/untar/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
nextflow_process {

name "Test Process UNTAR"
script "../main.nf"
process "UNTAR"

tag "modules"
tag "modules_nfcore"
tag "untar"

test("test_untar") {

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ]
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(process.out.untar).match("test_untar") },
)
}

}

test("test_untar_different_output_path") {

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [], file(params.test_data['homo_sapiens']['illumina']['test_flowcell'], checkIfExists: true) ]
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(process.out.untar).match("test_untar_different_output_path") },
)
}

}

test("test_untar_onlyfiles") {

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [], file(params.test_data['generic']['tar']['tar_gz'], checkIfExists: true) ]
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(process.out.untar).match("test_untar_onlyfiles") },
)
}

}

}
Loading

0 comments on commit 8d23e7f

Please sign in to comment.