feat(archive): complete recorded session lifecycle
This commit is contained in:
@@ -129,6 +129,25 @@ def test_materializer_reuses_only_a_digest_validated_private_cache(tmp_path: Pat
|
||||
assert exporter.calls == 1
|
||||
|
||||
|
||||
def test_delete_cached_refuses_a_live_lease_then_removes_the_exact_cache(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
command = _command(tmp_path / "source")
|
||||
materializer = SessionRecordingMaterializer(
|
||||
tmp_path / "private",
|
||||
exporter=FakeExporter(),
|
||||
)
|
||||
recording, release = materializer.materialize_pinned(command)
|
||||
|
||||
assert materializer.delete_cached(command.session_id) is False
|
||||
assert recording.path.is_file()
|
||||
|
||||
release()
|
||||
assert materializer.delete_cached(command.session_id) is True
|
||||
assert not recording.path.parent.exists()
|
||||
assert command.primary_artifact.path.is_file()
|
||||
|
||||
|
||||
def test_materializer_rejects_changed_digest_bound_secondary_artifact(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user