Skip to content

Commit

Permalink
Added working integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
apetkau committed Mar 26, 2024
1 parent 16baf8e commit 7c6210c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 7 deletions.
4 changes: 1 addition & 3 deletions nf-test.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
config {

testsDir "tests"
workDir ".nf-test"
configFile "tests/nextflow.config"
profile ""

profile "docker"
}
6 changes: 6 additions & 0 deletions tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
Nextflow config file for running tests
========================================================================================
*/

params.max_memory = "2.GB"
params.max_cpus = 1

/* Remove gzipping on JSON output for testing/asserts on file contents */
iridanext.output.path = "${params.outdir}/iridanext.output.json"
28 changes: 28 additions & 0 deletions tests/pipelines/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
nextflow_pipeline {

name "Integration Tests from assemblies for MIKROKONDO"
script "main.nf"

test("Small-scale test of full pipeline") {
tag "pipeline"

when {
params {
input = "$baseDir/tests/data/samplesheets/samplesheet1.csv"
outdir = "results"
}
}

then {
assert workflow.success
assert path("$launchDir/results").exists()
assert path("$launchDir/results/locidex/merged/profile.tsv").exists()

// compare IRIDA Next JSON output
def iridanext_json = path("$launchDir/results/iridanext.output.json").json
def iridanext_global = iridanext_json.files.global
def iridanext_samples = iridanext_json.files.samples
def iridanext_metadata = iridanext_json.metadata.samples
}
}
}
4 changes: 0 additions & 4 deletions tests/samplesheets/samplesheet1.csv

This file was deleted.

0 comments on commit 7c6210c

Please sign in to comment.