Skip to content

Commit a5494c3

Browse files
committed
update snapshot pipeline level tests
1 parent 1c80693 commit a5494c3

File tree

6 files changed

+114
-669
lines changed

6 files changed

+114
-669
lines changed

tests/default.nf.test

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,34 @@ nextflow_pipeline {
3333
)
3434
}
3535
}
36+
37+
test("default test gpu -stub") {
38+
39+
options "-stub"
40+
when {
41+
params {
42+
outdir = "$outputDir"
43+
}
44+
}
45+
46+
then {
47+
// stable_name: All files + folders in ${params.outdir}/ with a stable name
48+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
49+
// stable_path: All files in ${params.outdir}/ with stable content
50+
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
51+
assertAll(
52+
{ assert workflow.success},
53+
{ assert snapshot(
54+
// Number of successful tasks
55+
workflow.trace.succeeded().size(),
56+
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we test pipelines on multiple Nextflow versions
57+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_lsmquant_software_mqc_versions.yml"),
58+
// All stable path name, with a relative path
59+
stable_name,
60+
// All files with stable contents
61+
stable_path
62+
).match() }
63+
)
64+
}
65+
}
3666
}

tests/default.nf.test.snap

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,88 @@
11
{
2+
"default test gpu -stub": {
3+
"content": [
4+
8,
5+
{
6+
"MAT2JSON_INT": {
7+
"mat2json": 1.0
8+
},
9+
"NUMORPH3DUNET": {
10+
"numorph3dunet": 1.0
11+
},
12+
"NUMORPHALIGN": {
13+
"numorphalign": 1.0
14+
},
15+
"NUMORPHINTENSITY": {
16+
"numorphintensity": 1.0
17+
},
18+
"NUMORPHSTITCH": {
19+
"numorphstitch": 1.0
20+
},
21+
"UNZIP": {
22+
"7za": 16.02
23+
},
24+
"Workflow": {
25+
"nf-core/lsmquant": "v1.0dev"
26+
}
27+
},
28+
[
29+
"mat2json",
30+
"mat2json/align",
31+
"mat2json/align/TEST1.json",
32+
"mat2json/intensity",
33+
"mat2json/intensity/TEST1.json",
34+
"mat2json/stitch",
35+
"mat2json/stitch/TEST1.json",
36+
"numorph3dunet",
37+
"numorph3dunet/TEST1",
38+
"numorph3dunet/TEST1/TEST1.csv",
39+
"numorph3dunet/TEST1/TEST1_counts.csv",
40+
"numorphalign",
41+
"numorphalign/TEST1",
42+
"numorphalign/TEST1/samples",
43+
"numorphalign/TEST1/samples/alignment",
44+
"numorphalign/TEST1/samples/alignment/TEST1_full.tif",
45+
"numorphalign/TEST1/variables",
46+
"numorphalign/TEST1/variables/alignment_table.mat",
47+
"numorphalign/TEST1/variables/path_table.mat",
48+
"numorphalign/TEST1/variables/z_displacement_align.mat",
49+
"numorphintensity",
50+
"numorphintensity/TEST1",
51+
"numorphintensity/TEST1/samples",
52+
"numorphintensity/TEST1/samples/intensity_adjustment",
53+
"numorphintensity/TEST1/samples/intensity_adjustment/TEST1.png",
54+
"numorphintensity/TEST1/variables",
55+
"numorphintensity/TEST1/variables/adj_params.mat",
56+
"numorphintensity/TEST1/variables/path_table.mat",
57+
"numorphintensity/TEST1/variables/thresholds.mat",
58+
"numorphstitch",
59+
"numorphstitch/TEST1",
60+
"numorphstitch/TEST1/stitched",
61+
"numorphstitch/TEST1/stitched/TEST1_stitched.tif",
62+
"numorphstitch/TEST1/variables",
63+
"numorphstitch/TEST1/variables/adjusted_z.mat",
64+
"numorphstitch/TEST1/variables/path_table.mat",
65+
"numorphstitch/TEST1/variables/stitch_tforms.mat",
66+
"numorphstitch/TEST1/variables/z_dips_matrix.mat",
67+
"pipeline_info",
68+
"pipeline_info/nf_core_lsmquant_software_mqc_versions.yml",
69+
"unzip",
70+
"unzip/TEST1"
71+
],
72+
[
73+
"TEST1.json:md5,d41d8cd98f00b204e9800998ecf8427e",
74+
"TEST1.json:md5,d41d8cd98f00b204e9800998ecf8427e",
75+
"TEST1.json:md5,d41d8cd98f00b204e9800998ecf8427e",
76+
"TEST1_full.tif:md5,d41d8cd98f00b204e9800998ecf8427e",
77+
"TEST1_stitched.tif:md5,d41d8cd98f00b204e9800998ecf8427e"
78+
]
79+
],
80+
"meta": {
81+
"nf-test": "0.9.2",
82+
"nextflow": "25.04.6"
83+
},
84+
"timestamp": "2025-09-01T13:52:09.520222007"
85+
},
286
"default test gpu": {
387
"content": [
488
8,

tests/preprocess.nf.test

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)