Skip to content

Commit 2ce830b

Browse files
committed
update default tests
1 parent b2ac86f commit 2ce830b

File tree

2 files changed

+164
-270
lines changed

2 files changed

+164
-270
lines changed

tests/default.nf.test

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ nextflow_pipeline {
1313

1414
then {
1515
// stable_name: All files + folders in ${params.outdir}/ with a stable name
16-
def stable_name = getAllFilesFromDir(params.outdir, true, ['pipeline_info/*.{html,json,txt}'], null)
16+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
1717
// stable_path: All files in ${params.outdir}/ with stable content
18-
def stable_path = getAllFilesFromDir(params.outdir, false, null, 'tests/.nftignore')
18+
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
19+
// bam_files: All bam files
20+
def bam_files = getAllFilesFromDir(params.outdir, include: ['**/*.bam'])
1921
assertAll(
2022
{ assert workflow.success},
2123
{ assert snapshot(
@@ -24,9 +26,11 @@ nextflow_pipeline {
2426
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
2527
removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnaseq_software_mqc_versions.yml"),
2628
// All stable path name, with a relative path
27-
getRelativePath(stable_name, outputDir),
29+
stable_name,
2830
// All files with stable contents
29-
stable_path
31+
stable_path,
32+
// All bam files
33+
bam_files.collect{ file -> [ file.getName(), bam(file.toString()).getReadsMD5() ] }
3034
).match() }
3135
)
3236
}
@@ -44,9 +48,9 @@ nextflow_pipeline {
4448

4549
then {
4650
// stable_name: All files + folders in ${params.outdir}/ with a stable name
47-
def stable_name = getAllFilesFromDir(params.outdir, true, ['pipeline_info/*.{html,json,txt}'], null)
51+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
4852
// stable_path: All files in ${params.outdir}/ with stable content
49-
def stable_path = getAllFilesFromDir(params.outdir, false, null, 'tests/.nftignore')
53+
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
5054
assertAll(
5155
{ assert workflow.success},
5256
{ assert snapshot(
@@ -55,7 +59,7 @@ nextflow_pipeline {
5559
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
5660
removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnaseq_software_mqc_versions.yml"),
5761
// All stable path name, with a relative path
58-
getRelativePath(stable_name, outputDir),
62+
stable_name,
5963
// All files with stable contents
6064
stable_path
6165
).match() }

0 commit comments

Comments
 (0)