diff --git a/tests/functional/triggering/09-fail.t b/tests/functional/triggering/09-fail.t
deleted file mode 100644
index 0f4698ec2ac..00000000000
--- a/tests/functional/triggering/09-fail.t
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-# 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 .
-#-------------------------------------------------------------------------------
-# Test fail triggering
-. "$(dirname "$0")/test_header"
-set_test_number 2
-reftest
-exit
diff --git a/tests/functional/triggering/09-fail/flow.cylc b/tests/functional/triggering/09-fail/flow.cylc
deleted file mode 100644
index b4048e27ae5..00000000000
--- a/tests/functional/triggering/09-fail/flow.cylc
+++ /dev/null
@@ -1,12 +0,0 @@
-[scheduler]
- [[events]]
- expected task failures = 1/foo
-
-[scheduling]
- [[graph]]
- R1 = "foo:fail => bar"
-[runtime]
- [[foo]]
- script = "false"
- [[bar]]
- script = "true"
diff --git a/tests/functional/triggering/09-fail/reference.log b/tests/functional/triggering/09-fail/reference.log
deleted file mode 100644
index 1a9f846c98d..00000000000
--- a/tests/functional/triggering/09-fail/reference.log
+++ /dev/null
@@ -1,4 +0,0 @@
-Initial point: 1
-Final point: 1
-1/foo -triggered off []
-1/bar -triggered off ['1/foo']
diff --git a/tests/integration/test_scan_api.py b/tests/integration/test_scan_api.py
index ea25035e804..71d83124f77 100644
--- a/tests/integration/test_scan_api.py
+++ b/tests/integration/test_scan_api.py
@@ -80,14 +80,14 @@ async def flows(mod_flow, mod_scheduler, mod_run, mod_one_conf):
}
},
'runtime': {
- 'one': {
- 'execution time limit': 'PT10S'
+ 'foo': {
+ 'simulation': {'default run length': 'PT10S'}
}
}
},
name='-running-'
)
- schd2 = mod_scheduler(reg2, run_mode='simulation', paused_start=False)
+ schd2 = mod_scheduler(reg2, paused_start=False)
# run cylc run
async with mod_run(schd1):
diff --git a/tests/integration/test_triggering.py b/tests/integration/test_triggering.py
new file mode 100644
index 00000000000..f086d46aa4c
--- /dev/null
+++ b/tests/integration/test_triggering.py
@@ -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 .
+
+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'}
+ },
+ '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',)),
+ }
diff --git a/tests/integration/tui/screenshots/test_scheduler_logs.workflow-configuration-file.html b/tests/integration/tui/screenshots/test_scheduler_logs.workflow-configuration-file.html
index 8cc2f9af73b..04ebb27ff79 100644
--- a/tests/integration/tui/screenshots/test_scheduler_logs.workflow-configuration-file.html
+++ b/tests/integration/tui/screenshots/test_scheduler_logs.workflow-configuration-file.html
@@ -3,14 +3,14 @@
│ Path: mypath │
│ < Select File > │
│ │
-│ [runtime] │
-│ [[a]] │
│ [scheduling] │
│ [[graph]] │
│ R1 = a │
-│ │
-│ │
-│ │
+│ [runtime] │
+│ [[a]] │
+│ [[root]] │
+│ [[[simulation]]] │
+│ default run length = PT0S │
│ │
│ │
│ │
diff --git a/tests/integration/utils/flow_tools.py b/tests/integration/utils/flow_tools.py
index 9270f12ee8d..c26f79c04ac 100644
--- a/tests/integration/utils/flow_tools.py
+++ b/tests/integration/utils/flow_tools.py
@@ -66,19 +66,14 @@ def _make_flow(
flow_run_dir = (test_dir / name)
flow_run_dir.mkdir(parents=True, exist_ok=True)
id_ = str(flow_run_dir.relative_to(cylc_run_dir))
- conf = flow_config_str({
- # override the default simulation runtime logic to make
- # tasks execute instantly
- # NOTE: this is prepended so it can be overwritten
- 'runtime': {
- 'root': {
- 'simulation': {
- 'default run length': 'PT0S',
- },
- },
- },
- **conf,
- })
+ # set the default simulation runtime to zero (can be overridden)
+ (
+ conf.setdefault('runtime', {})
+ .setdefault('root', {})
+ .setdefault('simulation', {})
+ .setdefault('default run length', 'PT0S')
+ )
+ conf = flow_config_str(conf)
with open((flow_run_dir / WorkflowFiles.FLOW_FILE), 'w+') as flow_file:
flow_file.write(conf)
return id_