From 609350a3e8b0aa10cfda325926fd3bad14cefced Mon Sep 17 00:00:00 2001 From: Robert Rosca <robert.rosca@xfel.eu> Date: Wed, 11 May 2022 17:14:47 +0200 Subject: [PATCH] Symlinks for `raw` dir not run dir --- tests/test_webservice.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/test_webservice.py b/tests/test_webservice.py index 4dffa46d2..4954fd0df 100644 --- a/tests/test_webservice.py +++ b/tests/test_webservice.py @@ -104,19 +104,22 @@ async def test_wait_on_transfer( expected_error = run_links_to not in repositories gpfs_prefix = tmp_root / "gpfs/exfel/d" - gpfs_dir = gpfs_prefix / f"raw/{inst}/{cycle}/p{prop_no}/r{run_no}" + gpfs_dir = gpfs_prefix / f"raw/{inst}/{cycle}/p{prop_no}" gpfs_dir.mkdir(parents=True) pnfs_prefix = tmp_root / "pnfs/xfel.eu/exfel/archive/XFEL" - pnfs_dir = pnfs_prefix / f"raw/{inst}/{cycle}/p{prop_no}/r{run_no}" + pnfs_dir = pnfs_prefix / f"raw/{inst}/{cycle}/p{prop_no}" pnfs_dir.mkdir(parents=True) - run_path = tmp_root / f"gpfs/exfel/exp/{inst}/{cycle}/p{prop_no:06d}/raw/r{run_no:04d}" - run_path.parent.mkdir(parents=True) + raw_path = tmp_root / f"gpfs/exfel/exp/{inst}/{cycle}/p{prop_no:06d}/raw" + raw_path.parent.mkdir(parents=True) if run_links_to == "XFEL_GPFS_OFFLINE_RAW_CC": - run_path.symlink_to(gpfs_dir) + raw_path.symlink_to(gpfs_dir) else: - run_path.symlink_to(pnfs_dir) + raw_path.symlink_to(pnfs_dir) + + run_path = raw_path / "r{run_no:04d}" + run_path.mkdir(parents=True) response = mock.Mock() response.status_code = 200 -- GitLab