From a03c22b0176c3386198953cc66e66381ea922251 Mon Sep 17 00:00:00 2001 From: Aaron Petkau Date: Tue, 26 Mar 2024 14:05:03 -0500 Subject: [PATCH] Added asserts for profile contents --- tests/data/profiles/expected-profile1.tsv | 4 ++++ tests/pipelines/main.nf.test | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/data/profiles/expected-profile1.tsv diff --git a/tests/data/profiles/expected-profile1.tsv b/tests/data/profiles/expected-profile1.tsv new file mode 100644 index 0000000..9b938e1 --- /dev/null +++ b/tests/data/profiles/expected-profile1.tsv @@ -0,0 +1,4 @@ +sample_id l1 l2 l3 +sample1 1 1 1 +sample2 1 1 1 +sample3 1 1 2 diff --git a/tests/pipelines/main.nf.test b/tests/pipelines/main.nf.test index 0943982..ca901cf 100644 --- a/tests/pipelines/main.nf.test +++ b/tests/pipelines/main.nf.test @@ -16,7 +16,11 @@ nextflow_pipeline { then { assert workflow.success assert path("$launchDir/results").exists() - assert path("$launchDir/results/locidex/merged/profile.tsv").exists() + + // Check MLST files + def actual_profile_tsv = path("$launchDir/results/locidex/merged/profile.tsv") + def expected_profile_tsv = path("$baseDir/tests/data/profiles/expected-profile1.tsv") + assert actual_profile_tsv.text == expected_profile_tsv.text // compare IRIDA Next JSON output def iridanext_json = path("$launchDir/results/iridanext.output.json").json