From f52ae506b02e19fdf15bda7d4f8dcf453eb66296 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 17 Jan 2025 10:02:03 +0100 Subject: [PATCH] Check presence of unstable --- .../catpack/prepare/tests/main.nf.test | 8 ++- .../catpack/prepare/tests/main.nf.test.snap | 61 +++++-------------- 2 files changed, 21 insertions(+), 48 deletions(-) diff --git a/modules/nf-core/catpack/prepare/tests/main.nf.test b/modules/nf-core/catpack/prepare/tests/main.nf.test index d3a7599c37b..c4ba34f6f54 100644 --- a/modules/nf-core/catpack/prepare/tests/main.nf.test +++ b/modules/nf-core/catpack/prepare/tests/main.nf.test @@ -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() } ) } diff --git a/modules/nf-core/catpack/prepare/tests/main.nf.test.snap b/modules/nf-core/catpack/prepare/tests/main.nf.test.snap index 8bbd6934fe8..c5b5c9c0d2e 100644 --- a/modules/nf-core/catpack/prepare/tests/main.nf.test.snap +++ b/modules/nf-core/catpack/prepare/tests/main.nf.test.snap @@ -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": [