Mark Pampuch
03/09/2026, 1:10 PMnf-test.config file, I have these lines:
config {
// run all test with defined profile(s) from the main nextflow.config
profile "test"
}
but in my module test, I want to test both singularity and docker containers, so I tried to do this:
nextflow_process {
name "Test Process DECOMPRESS_GENOME"
script "modules/local/decompress_genome/decompress_genome.nf"
process "DECOMPRESS_GENOME"
// =========================================================================
// SINGULARITY TEST
// =========================================================================
test("singularity | .fa.gz - decompresses to .fa") {
options "-profile singularity"
when {
process {
"""
input[0] = [
[ id: 'test_fa' ],
file("${projectDir}/modules/local/decompress_genome/TESTDATA/GCA_009858895.3_ASM985889v3_genomic.200409.fa.gz")
]
"""
}
}
then {
assert process.success
// Output genome file exists and has expected extension
assert process.out.genome.size() == 1
assert process.out.genome[0][1].name.endsWith('.fa')
assert process.out.genome[0][1].size() > 0
// Metadata passthrough
assert process.out.genome[0][0].id == 'test_fa'
// versions.yml is emitted
assert process.out.versions.size() == 1
assert snapshot(process.out).match()
}
}
// =========================================================================
// DOCKER TEST
// =========================================================================
test("docker | .fa.gz - decompresses to .fa") {
options "-profile docker"
when {
process {
"""
input[0] = [
[ id: 'test_fa' ],
file("${projectDir}/modules/local/decompress_genome/TESTDATA/GCA_009858895.3_ASM985889v3_genomic.200409.fa.gz")
]
"""
}
}
then {
assert process.success
// Output genome file exists and has expected extension
assert process.out.genome.size() == 1
assert process.out.genome[0][1].name.endsWith('.fa')
assert process.out.genome[0][1].size() > 0
// Metadata passthrough
assert process.out.genome[0][0].id == 'test_fa'
// versions.yml is emitted
assert process.out.versions.size() == 1
assert snapshot(process.out).match()
}
}
}
But in my test outputs std.err files I get this
Can only specify option -profile once. -- Check the available commands and options and syntax with 'help'
Is there a way to append more profiles to individuals tests or is there a smarter way to do this overall?Evangelos Karatzas
03/09/2026, 1:57 PMnf-test test /path/to/main.nf.test --profile +singularity --verbose --update-snapshotEvangelos Karatzas
03/09/2026, 1:57 PMtest profile which is sourced by default on nf-core/modules