@@ -15,15 +15,28 @@ nextflow_pipeline {
1515 }
1616
1717 then {
18+ // stable_name: All files + folders in ${params.outdir}/ with a stable name
19+ def stable_name = getAllFilesFromDir(
20+ params.outdir,
21+ relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']
22+ )
23+ // stable_path: All files in ${params.outdir}/ with stable content
24+ def stable_path = getAllFilesFromDir(
25+ params.outdir,
26+ ignoreFile: 'tests/.nftignore'
27+ )
1828 assertAll(
19- { assert workflow.success },
29+ { assert workflow.success},
2030 { assert snapshot(
21- path("$outputDir/multiqc/global_report/multiqc_data/multiqc_citations.txt"),
22- path("$outputDir/multiqc/global_report/multiqc_data/multiqc_fastqc.txt"),
23- path("$outputDir/multiqc/global_report/multiqc_data/multiqc_general_stats.txt"),
24- path("$outputDir/multiqc/global_report/multiqc_data/multiqc_fastq_screen.txt"),
25- ).match()
26- }
31+ // Number of successful tasks
32+ workflow.trace.succeeded().size(),
33+ // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
34+ removeNextflowVersion("$outputDir/pipeline_info/nf_core_seqinspector_software_mqc_versions.yml"),
35+ // All stable path names, with a relative path
36+ stable_name,
37+ // All files with stable contents
38+ stable_path
39+ ).match() }
2740 )
2841 }
2942 }
@@ -38,15 +51,64 @@ nextflow_pipeline {
3851 }
3952
4053 then {
54+ // stable_name: All files + folders in ${params.outdir}/ with a stable name
55+ def stable_name = getAllFilesFromDir(
56+ params.outdir,
57+ relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']
58+ )
59+ // stable_path: All files in ${params.outdir}/ with stable content
60+ def stable_path = getAllFilesFromDir(
61+ params.outdir,
62+ ignoreFile: 'tests/.nftignore'
63+ )
64+ assertAll(
65+ { assert workflow.success},
66+ { assert snapshot(
67+ // Number of successful tasks
68+ workflow.trace.succeeded().size(),
69+ // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
70+ removeNextflowVersion("$outputDir/pipeline_info/nf_core_seqinspector_software_mqc_versions.yml"),
71+ // All stable path names, with a relative path
72+ stable_name,
73+ // All files with stable contents
74+ stable_path
75+ ).match() }
76+ )
77+ }
78+ }
79+
80+ test("Miseq data test (skip all tools)") {
81+ when {
82+ config "./MiSeq.main.nf.test.config"
83+ params {
84+ outdir = "$outputDir"
85+ skip_tools = "fastqc,fastqscreen,seqfu_stats,seqtk_sample"
86+ }
87+ }
88+
89+ then {
90+ // stable_name: All files + folders in ${params.outdir}/ with a stable name
91+ def stable_name = getAllFilesFromDir(
92+ params.outdir,
93+ relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']
94+ )
95+ // stable_path: All files in ${params.outdir}/ with stable content
96+ def stable_path = getAllFilesFromDir(
97+ params.outdir,
98+ ignoreFile: 'tests/.nftignore'
99+ )
41100 assertAll(
42- { assert workflow.success },
101+ { assert workflow.success},
43102 { assert snapshot(
44- path("$outputDir/multiqc/global_report/multiqc_data/multiqc_citations.txt"),
45- ).match()
46- },
47- {
48- assert !path("$outputDir/multiqc/global_report/multiqc_data/multiqc_fastqc.txt").exists()
49- }
103+ // Number of successful tasks
104+ workflow.trace.succeeded().size(),
105+ // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
106+ removeNextflowVersion("$outputDir/pipeline_info/nf_core_seqinspector_software_mqc_versions.yml"),
107+ // All stable path names, with a relative path
108+ stable_name,
109+ // All files with stable contents
110+ stable_path
111+ ).match() }
50112 )
51113 }
52114 }
0 commit comments