fix(preprocess): retain DWH root fd through lease
This commit is contained in:
@@ -120,7 +120,6 @@ def test_writer_rejects_dangling_legacy_symlinks_before_claim_or_callback(tmp_pa
|
||||
def test_owner_publication_remains_on_locked_root_when_path_is_swapped(
|
||||
monkeypatch, tmp_path,
|
||||
):
|
||||
import os
|
||||
import pytest
|
||||
import tht.jobs.dwh_pipeline as module
|
||||
|
||||
@@ -135,6 +134,7 @@ def test_owner_publication_remains_on_locked_root_when_path_is_swapped(
|
||||
swapped = True
|
||||
replacement.rename(moved)
|
||||
replacement.mkdir(mode=0o700)
|
||||
(moved / "generation.lock").rename(replacement / "generation.lock")
|
||||
return real_replace(source, destination, *args, **kwargs)
|
||||
|
||||
monkeypatch.setattr(module.os, "replace", swapping_replace)
|
||||
@@ -149,7 +149,7 @@ def test_owner_publication_remains_on_locked_root_when_path_is_swapped(
|
||||
assert swapped
|
||||
assert (moved / "OWNER.json").is_file()
|
||||
assert not (replacement / "OWNER.json").exists()
|
||||
assert os.stat(moved / "generation.lock").st_ino != os.stat(replacement).st_ino
|
||||
assert (replacement / "generation.lock").is_file()
|
||||
|
||||
|
||||
def test_owner_requires_exact_read_only_owner_mode_and_active_requires_binding(tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user