Skip to content

Commit

Permalink
update default tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse committed Oct 10, 2024
1 parent b2ac86f commit 2ce830b
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 270 deletions.
18 changes: 11 additions & 7 deletions tests/default.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ nextflow_pipeline {

then {
// stable_name: All files + folders in ${params.outdir}/ with a stable name
def stable_name = getAllFilesFromDir(params.outdir, true, ['pipeline_info/*.{html,json,txt}'], null)
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
// stable_path: All files in ${params.outdir}/ with stable content
def stable_path = getAllFilesFromDir(params.outdir, false, null, 'tests/.nftignore')
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
// bam_files: All bam files
def bam_files = getAllFilesFromDir(params.outdir, include: ['**/*.bam'])
assertAll(
{ assert workflow.success},
{ assert snapshot(
Expand All @@ -24,9 +26,11 @@ nextflow_pipeline {
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnaseq_software_mqc_versions.yml"),
// All stable path name, with a relative path
getRelativePath(stable_name, outputDir),
stable_name,
// All files with stable contents
stable_path
stable_path,
// All bam files
bam_files.collect{ file -> [ file.getName(), bam(file.toString()).getReadsMD5() ] }
).match() }
)
}
Expand All @@ -44,9 +48,9 @@ nextflow_pipeline {

then {
// stable_name: All files + folders in ${params.outdir}/ with a stable name
def stable_name = getAllFilesFromDir(params.outdir, true, ['pipeline_info/*.{html,json,txt}'], null)
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
// stable_path: All files in ${params.outdir}/ with stable content
def stable_path = getAllFilesFromDir(params.outdir, false, null, 'tests/.nftignore')
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
assertAll(
{ assert workflow.success},
{ assert snapshot(
Expand All @@ -55,7 +59,7 @@ nextflow_pipeline {
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnaseq_software_mqc_versions.yml"),
// All stable path name, with a relative path
getRelativePath(stable_name, outputDir),
stable_name,
// All files with stable contents
stable_path
).match() }
Expand Down
Loading

0 comments on commit 2ce830b

Please sign in to comment.