Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests): add gherkin test files to reana specification (#35) #35

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

The list of contributors in alphabetical order:

- [Alastair Lyall](https://orcid.org/0009-0000-4955-8935)
- [Audrius Mecionis](https://orcid.org/0000-0002-3759-1663)
- [Clemens Lange](https://orcid.org/0000-0002-3632-3157)
- [Daniel Prelipcean](https://orcid.org/0000-0002-4855-194X)
Expand Down
5 changes: 5 additions & 0 deletions reana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ outputs:
workflow:
type: snakemake
file: workflow/Snakefile
tests:
files:
- tests/log-messages.feature
- tests/run-duration.feature
- tests/workspace-files.feature
12 changes: 6 additions & 6 deletions tests/log-messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Feature: Log messages
"""
And the engine logs should contain
"""
reana-workflow-engine-snakemake | Thread-1 | INFO | scram job is finished
reana-workflow-engine-snakemake | MainThread | INFO | scram job is finished
"""

Scenario: The data analysis step has produced the expected messages
Expand All @@ -45,14 +45,14 @@ Feature: Log messages
TrigReport Trig Bit# Run Passed Failed Error Name
TrigReport 1 0 9058 9058 0 0 p
"""
And the engine logs should contain "reana-workflow-engine-snakemake | Thread-1 | INFO | analyze_data job is finished"
And the engine logs should contain "reana-workflow-engine-snakemake | MainThread | INFO | analyze_data job is finished"

Scenario: The montecarlo analysis step has produced the expected messages
When the workflow is finished
Then the engine logs should contain "reana-workflow-engine-snakemake | MainThread | INFO | Job 'analyze_mc' received"
And the job logs for the "analyze_mc" step should contain
"""
Successfully opened file root://eospublic.cern.ch//eos/opendata/cms/MonteCarlo2012/Summer12_DR53X/SMHiggsToZZTo4L_M-125_8TeV-powheg15-JHUgenV3-pythia6/AODSIM/PU_S10_START53_V19-v1/10000/029D759D-6CD9-E211-B3E2-1CC1DE041FD8.root"
Successfully opened file root://eospublic.cern.ch//eos/opendata/cms/MonteCarlo2012/Summer12_DR53X/SMHiggsToZZTo4L_M-125_8TeV-powheg15-JHUgenV3-pythia6/AODSIM/PU_S10_START53_V19-v1/10000/029D759D-6CD9-E211-B3E2-1CC1DE041FD8.root
"""
And the job logs for the "analyze_mc" step should contain
"""
Expand All @@ -63,7 +63,7 @@ Feature: Log messages
TrigReport Trig Bit# Run Passed Failed Error Name
TrigReport 1 0 7499 7499 0 0 p
"""
And the engine logs should contain "reana-workflow-engine-snakemake | Thread-1 | INFO | analyze_mc job is finished"
And the engine logs should contain "reana-workflow-engine-snakemake | MainThread | INFO | analyze_mc job is finished"

Scenario: The data plotting step has produced the expected messages
When the workflow is finished
Expand All @@ -75,8 +75,8 @@ Feature: Log messages
"""
pdf file ../../../../results/mass4l_combine_userlvl3.pdf has been created
"""
And the engine logs should contain "reana-workflow-engine-snakemake | Thread-1 | INFO | make_plot job is finished"
And the engine logs should contain "reana-workflow-engine-snakemake | MainThread | INFO | make_plot job is finished"

Scenario: The workflow completion has produced the expected messages
When the workflow is finished
Then the engine logs should contain "snakemake.logging | MainThread | INFO | 5 of 5 steps (100%) done"
Then the engine logs should contain "snakemake.logging | MainThread | INFO | 5 of 5 steps (100%) done"