Skip to content

Commit

Permalink
Added nf-test for eido/validate (nf-core#6401)
Browse files Browse the repository at this point in the history
* Added nf-test for eido/validate

* Fixed assertions
  • Loading branch information
GallVp authored Aug 28, 2024
1 parent 5c640d7 commit fc80686
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 50 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/eido/validate/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
homepage: "http://eido.databio.org/en/latest/"
documentation: "http://eido.databio.org/en/latest/"
doi: "10.1093/gigascience/giab077"
licence: "BSD-2-Clause"
licence: ["BSD-2-Clause"]
input:
- samplesheet:
type: file
Expand Down
64 changes: 64 additions & 0 deletions modules/nf-core/eido/validate/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

nextflow_process {

name "Test Process EIDO_VALIDATE"
script "../main.nf"
process "EIDO_VALIDATE"
config "./nextflow.config"

tag "modules"
tag "modules_nfcore"
tag "eido"
tag "eido/validate"

test("test-eido-validate-on-nextflow-samplesheet") {

when {
process {
"""
input[0] = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_nextflow_original_samplesheet.csv", checkIfExists: true)
input[1] = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_samplesheet_schema.yaml", checkIfExists: true)
input[2] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.log[0]).name,
process.out.versions
).match()
}
)
}
}

test("test-eido-validate-on-pep-config") {

when {
process {
"""
input[0] = file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/pep/test_pep_format_files/config.yaml", checkIfExists: true)
input[1] = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/pep/test_samplesheet_schema.yaml", checkIfExists: true)
input[2] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.log[0]).name,
process.out.versions
).match()
}
)
}
}

}
28 changes: 28 additions & 0 deletions modules/nf-core/eido/validate/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"test-eido-validate-on-pep-config": {
"content": [
"validation.log",
[
"versions.yml:md5,9a58d89818b4099d547bbaa9d2f2d8d9"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-28T14:41:24.013292"
},
"test-eido-validate-on-nextflow-samplesheet": {
"content": [
"validation.log",
[
"versions.yml:md5,9a58d89818b4099d547bbaa9d2f2d8d9"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-28T14:41:16.791933"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/eido/validate/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: 'EIDO_VALIDATE' {
ext.args = '--st-index sample'
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,6 @@ ectyper:
eido/convert:
- modules/nf-core/eido/convert/**
- tests/modules/nf-core/eido/convert/**
eido/validate:
- modules/nf-core/eido/validate/**
- tests/modules/nf-core/eido/validate/**
eigenstratdatabasetools/eigenstratsnpcoverage:
- modules/nf-core/eigenstratdatabasetools/eigenstratsnpcoverage/**
- tests/modules/nf-core/eigenstratdatabasetools/eigenstratsnpcoverage/**
Expand Down
23 changes: 0 additions & 23 deletions tests/modules/nf-core/eido/validate/main.nf

This file was deleted.

8 changes: 0 additions & 8 deletions tests/modules/nf-core/eido/validate/nextflow.config

This file was deleted.

15 changes: 0 additions & 15 deletions tests/modules/nf-core/eido/validate/test.yml

This file was deleted.

0 comments on commit fc80686

Please sign in to comment.