Skip to content

Commit

Permalink
Check presence of unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
jfy133 committed Jan 17, 2025
1 parent 0f6cb1d commit f52ae50
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 48 deletions.
8 changes: 7 additions & 1 deletion modules/nf-core/catpack/prepare/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ nextflow_process {
}

then {
def stablefiles = []
file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (!file.isDirectory() && !["database.log"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} }
def unstablefiles = []
file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (["database.log"].find {file.toString().endsWith(it)}) {unstablefiles.add(file.getName().toString())} }
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
stablefiles.sort(),
unstablefiles.sort(),
process.out.versions
).match() }
)
}
Expand Down
61 changes: 14 additions & 47 deletions modules/nf-core/catpack/prepare/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,58 +1,25 @@
{
"metagenome -sarscov2 - fasta": {
"content": [
{
"0": [
[
{
"id": "test"
},
[
"database.log:md5,9f6567ac9cabc9953dc5d0813d816d30",
[
"database.dmnd:md5,fd719846b0f5a177642fbddf461a5737",
"database.fastaid2LCAtaxid:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.taxids_with_multiple_offspring:md5,d41d8cd98f00b204e9800998ecf8427e"
],
[
"names.dmp:md5,c471c27a4ce85ae74d2c63633c9ce1e3",
"nodes.dmp:md5,130f9132095562e09c732679c562f5e9"
]
]
]
],
"1": [
"versions.yml:md5,d851e296d4025a8060b6283ad3b63937"
],
"db": [
[
{
"id": "test"
},
[
"database.log:md5,9f6567ac9cabc9953dc5d0813d816d30",
[
"database.dmnd:md5,fd719846b0f5a177642fbddf461a5737",
"database.fastaid2LCAtaxid:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.taxids_with_multiple_offspring:md5,d41d8cd98f00b204e9800998ecf8427e"
],
[
"names.dmp:md5,c471c27a4ce85ae74d2c63633c9ce1e3",
"nodes.dmp:md5,130f9132095562e09c732679c562f5e9"
]
]
]
],
"versions": [
"versions.yml:md5,d851e296d4025a8060b6283ad3b63937"
]
}
[
"database.dmnd:md5,fd719846b0f5a177642fbddf461a5737",
"database.fastaid2LCAtaxid:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.taxids_with_multiple_offspring:md5,d41d8cd98f00b204e9800998ecf8427e",
"names.dmp:md5,c471c27a4ce85ae74d2c63633c9ce1e3",
"nodes.dmp:md5,130f9132095562e09c732679c562f5e9"
],
[
"database.log"
],
[
"versions.yml:md5,d851e296d4025a8060b6283ad3b63937"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.10.2"
},
"timestamp": "2025-01-17T08:47:32.989772786"
"timestamp": "2025-01-17T10:01:05.480865778"
},
"metagenome -sarscov2 - fasta - stub": {
"content": [
Expand Down

0 comments on commit f52ae50

Please sign in to comment.