Skip to content

Commit

Permalink
update featurecounts_group_type tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse committed Oct 10, 2024
1 parent 2ce830b commit e5c8c9d
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 268 deletions.
18 changes: 11 additions & 7 deletions tests/featurecounts_group_type.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,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 @@ -25,9 +27,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 @@ -46,9 +50,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 @@ -57,7 +61,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 e5c8c9d

Please sign in to comment.