Skip to content

Commit

Permalink
scan: test cylc 7 / 8 run
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Mar 31, 2022
1 parent 352175a commit 4e9a091
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/integration/test_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,17 @@ def cylc7_run_dir(tmp_path):
Path(cylc8, WorkflowFiles.LOG_DIR, 'workflow').mkdir(parents=True)
Path(cylc8, WorkflowFiles.LOG_DIR, 'workflow', 'log').touch()

# crazy niche case of a Cylc 7 workflow that has had its DB removed
# and re-run under Cylc 8
# (should appear in scan results)
cylc8 = tmp_path / 'cylc78'
cylc8.mkdir()
(cylc8 / WorkflowFiles.SUITE_RC).touch()
Path(cylc8, WorkflowFiles.LOG_DIR, 'suite').mkdir(parents=True)
Path(cylc8, WorkflowFiles.LOG_DIR, 'suite', 'log').touch()
Path(cylc8, WorkflowFiles.LOG_DIR, 'workflow').mkdir(parents=True)
Path(cylc8, WorkflowFiles.LOG_DIR, 'workflow', 'log').touch()

return tmp_path


Expand All @@ -444,5 +455,5 @@ async def test_scan_cylc7(cylc7_run_dir):
assert await listify(
scan(cylc7_run_dir)
) == [
'cylc8', 'either'
'cylc78', 'cylc8', 'either'
]

0 comments on commit 4e9a091

Please sign in to comment.