Skip to content

Commit 4bb0af1

Browse files
committed
Add test for no fasta
1 parent 53a1638 commit 4bb0af1

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

tests/nofasta.nf.test

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
nextflow_pipeline {
2+
3+
name "Test pipeline by skipping trimming options"
4+
script "../main.nf"
5+
6+
test("Params: no fasta") {
7+
8+
when {
9+
params {
10+
outdir = "$outputDir"
11+
skip_alignment = true
12+
fasta = null
13+
additional_fasta = null
14+
salmon_index = null
15+
transcript_fasta = "https://raw.githubusercontent.com/nf-core/test-datasets/d1f59361a013a8820c824d606f5853db0d6c7999/reference/transcriptome_match_gtf.fa"
16+
}
17+
}
18+
19+
then {
20+
// stable_name: All files + folders in ${params.outdir}/ with a stable name
21+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
22+
// stable_path: All files in ${params.outdir}/ with stable content
23+
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
24+
assertAll(
25+
{ assert workflow.success},
26+
{ assert snapshot(
27+
// Number of successful tasks
28+
workflow.trace.succeeded().size(),
29+
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
30+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnaseq_software_mqc_versions.yml"),
31+
// All stable path name, with a relative path
32+
stable_name,
33+
// All files with stable contents
34+
stable_path
35+
).match() }
36+
)
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)