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

Test.example replace a reftest #5860

Merged
merged 10 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 8 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
22 changes: 0 additions & 22 deletions tests/functional/triggering/09-fail.t

This file was deleted.

12 changes: 0 additions & 12 deletions tests/functional/triggering/09-fail/flow.cylc

This file was deleted.

4 changes: 0 additions & 4 deletions tests/functional/triggering/09-fail/reference.log

This file was deleted.

1 change: 1 addition & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ def reflog():
"""

def _reflog(schd, flow_nums=False):

wxtim marked this conversation as resolved.
Show resolved Hide resolved
submit_task_jobs = schd.task_job_mgr.submit_task_jobs
triggers = set()

Expand Down
46 changes: 46 additions & 0 deletions tests/integration/test_triggering.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

async def test_fail(flow, scheduler, run, reflog, complete, validate):
"""Test triggering on :fail"""
id_ = flow({
'scheduler': {
'allow implicit tasks': 'true'
},
'scheduling': {
'graph': {
'R1': 'foo:failed => bar'
}
},
'runtime': {
'root': {
'simulation': {'default run length': 'PT0S'}
},
MetRonnie marked this conversation as resolved.
Show resolved Hide resolved
'foo': {
'simulation': {'fail cycle points': 'all'}
}
}
})
schd = scheduler(id_, paused_start=False)

async with run(schd):
triggers = reflog(schd)
await complete(schd)

assert triggers == {
('1/foo', None),
('1/bar', ('1/foo',)),
}
Loading