Skip to content

Commit

Permalink
Start with tests for the gantt plots
Browse files Browse the repository at this point in the history
  • Loading branch information
pinin4fjords committed Nov 28, 2023
1 parent 1bd8318 commit e04c3e9
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/local/plot_run_gantt/tests/.nf-test.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Nov-28 09:37:34.522 [main] INFO com.askimed.nf.test.App - nf-test 0.8.1
Nov-28 09:37:34.552 [main] INFO com.askimed.nf.test.App - Arguments: [test, --profile=conda, --tap=test.tap, --verbose]
Nov-28 09:37:34.555 [main] WARN com.askimed.nf.test.commands.RunTestsCommand - No nf-test config file found.
Nov-28 09:37:34.555 [main] ERROR com.askimed.nf.test.commands.RunTestsCommand - No tests ot directories found containing test files.
42 changes: 42 additions & 0 deletions modules/local/plot_run_gantt/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
nextflow_process {

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

tag "modules"
tag "modules_local"
tag "plot_run_gantt"

test("Should run without failures") {

setup {
run("SEQERA_RUNS_DUMP") {
script "../../seqera_runs_dump/main.nf"
process {
"""
input[0] = ['id': '4Bi5xBK6E2Nbhj', 'workspace': 'community/showcase']
"""
}
}
}

when {
process {
"""
input[0] = SEQERA_RUNS_DUMP.out.run_dump.join(SEQERA_RUNS_DUMP.out.workflow_json).map { meta, run_dump, json -> [ meta + [ pipeline : getWorkflowName(json) ], run_dump ] }
"""
}
}

then {
assertAll(
{ assert snapshot(process.out.html).match() },
{ assert process.success }
)
}

}

}
10 changes: 10 additions & 0 deletions modules/local/plot_run_gantt/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Should run without failures": {
"content": [
[

]
],
"timestamp": "2023-11-28T16:52:51.371307827"
}
}
1 change: 1 addition & 0 deletions modules/local/plot_run_gantt/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
process { withName: 'SEQERA_RUNS_DUMP' { container = 'public.ecr.aws/seqera-labs/wave/containers:tower-cli-0.9.0--2cb0f2e9d85d026b' } }
2 changes: 2 additions & 0 deletions modules/local/plot_run_gantt/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
plot_run_gantt:
- modules/local/plot_run_gantt/**

0 comments on commit e04c3e9

Please sign in to comment.