diff --git a/tests/test_webservice.py b/tests/test_webservice.py index 4dffa46d20c6171a2ffd65fa6a8559397a30237a..4954fd0dfde4011f0f4d579963be4884bdf886f8 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