diff --git a/modules/nf-core/samtools/dict/tests/main.nf.test b/modules/nf-core/samtools/dict/tests/main.nf.test new file mode 100644 index 00000000000..c467081f82f --- /dev/null +++ b/modules/nf-core/samtools/dict/tests/main.nf.test @@ -0,0 +1,62 @@ +nextflow_process { + + name "Test Process SAMTOOLS_DICT" + script "../main.nf" + process "SAMTOOLS_DICT" + + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/dict" + + test("sarscov2 - fasta") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.dict[0][1]).readLines()[0], + process.out.versions + ).match() + } + ) + } + + } + + test("sarscov2 - fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/samtools/dict/tests/main.nf.test.snap b/modules/nf-core/samtools/dict/tests/main.nf.test.snap new file mode 100644 index 00000000000..66d7b1fcff5 --- /dev/null +++ b/modules/nf-core/samtools/dict/tests/main.nf.test.snap @@ -0,0 +1,50 @@ +{ + "sarscov2 - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.dict:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,47f9e889ed1e779cb54e61d707a7135d" + ], + "dict": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.dict:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,47f9e889ed1e779cb54e61d707a7135d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-18T09:43:30.509703257" + }, + "sarscov2 - fasta": { + "content": [ + "@HD\tVN:1.0\tSO:unsorted", + [ + "versions.yml:md5,0af6b2d2d6d9d96bc5abe98b99b91446" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-30T12:12:31.201483952" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 3a934c1cd7c..7cb4e8555e1 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1331,9 +1331,6 @@ samtools/collatefastq: samtools/depth: - modules/nf-core/samtools/depth/** - tests/modules/nf-core/samtools/depth/** -samtools/dict: - - modules/nf-core/samtools/dict/** - - tests/modules/nf-core/samtools/dict/** samtools/fasta: - modules/nf-core/samtools/fasta/** - tests/modules/nf-core/samtools/fasta/** diff --git a/tests/modules/nf-core/samtools/dict/main.nf b/tests/modules/nf-core/samtools/dict/main.nf deleted file mode 100644 index 7bac114a4f1..00000000000 --- a/tests/modules/nf-core/samtools/dict/main.nf +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SAMTOOLS_DICT } from '../../../../../modules/nf-core/samtools/dict/main.nf' - -workflow test_samtools_dict { - - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - - SAMTOOLS_DICT ( input ) -} diff --git a/tests/modules/nf-core/samtools/dict/nextflow.config b/tests/modules/nf-core/samtools/dict/nextflow.config deleted file mode 100644 index 8730f1c4b93..00000000000 --- a/tests/modules/nf-core/samtools/dict/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/modules/nf-core/samtools/dict/test.yml b/tests/modules/nf-core/samtools/dict/test.yml deleted file mode 100644 index a037744fc8a..00000000000 --- a/tests/modules/nf-core/samtools/dict/test.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: samtools dict test_samtools_dict - command: nextflow run ./tests/modules/nf-core/samtools/dict -entry test_samtools_dict -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/dict/nextflow.config - tags: - - samtools/dict - - samtools - files: - - path: output/samtools/genome.fasta.dict - contains: - - "SN:MT192765.1" - - "LN:29829" - - "M5:c95f3e5592d0ad9974e41e7f0ea14eb0" - - path: output/samtools/versions.yml