Skip to content

Commit

Permalink
Added tests with pd_columns
Browse files Browse the repository at this point in the history
  • Loading branch information
kylacochrane committed Jun 17, 2024
1 parent 23ec449 commit 01b1e4b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/data/columns/keep-zero-loci-empty-file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

36 changes: 36 additions & 0 deletions tests/pipelines/main_missing_alleles.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,41 @@ nextflow_pipeline {
assert iridanext_metadata.sampleQ."address" == "1"
}
}

test("Test fail pipeline if non-existent columns file is passed") {
tag "pipeline_failure_columns_no_exist"

when {
params {
input = "$baseDir/tests/data/samplesheets/samplesheet-hash_missing.csv"
outdir = "results"

pd_columns = "./no-exist"
}
}

then {
assert workflow.failed
assert workflow.stderr.contains("* --pd_columns: the file or directory './no-exist' does not exist.")
}
}

test("Test failure of pipeline when keeping no loci") {
tag "pipeline_keep_zero_loci"

when {
params {
input = "$baseDir/tests/data/samplesheets/samplesheet-hash_missing.csv"
outdir = "results"

gm_thresholds = "0"
pd_columns = "$baseDir/tests/data/columns/keep-zero-loci-empty-file.txt"
}
}

then {
assert workflow.failed
}
}
}

0 comments on commit 01b1e4b

Please sign in to comment.