From 1e0e610cea62cd717a347a40f772d26eefbe79bc Mon Sep 17 00:00:00 2001 From: Alastair Lyall Date: Thu, 22 Aug 2024 17:23:31 +0200 Subject: [PATCH] feat(tests): add gherkin test files to reana specification (#35) --- AUTHORS.md | 1 + reana.yaml | 5 +++++ tests/log-messages.feature | 12 ++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 8c1a4b2..9f4670e 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -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) diff --git a/reana.yaml b/reana.yaml index 41042ad..b2443fc 100644 --- a/reana.yaml +++ b/reana.yaml @@ -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 diff --git a/tests/log-messages.feature b/tests/log-messages.feature index 1d9516f..67e050e 100644 --- a/tests/log-messages.feature +++ b/tests/log-messages.feature @@ -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 @@ -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 """ @@ -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 @@ -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" \ No newline at end of file + Then the engine logs should contain "snakemake.logging | MainThread | INFO | 5 of 5 steps (100%) done"