generated from coulomb/repo-seed
Add S3 backend and storage verification
This commit is contained in:
@@ -158,6 +158,24 @@ async def test_ingest_hints_override_primary_algorithm(
|
||||
assert result.primary_digest.hex == result.sha256_digest.hex
|
||||
|
||||
|
||||
async def test_ingest_hints_route_to_named_backend(tmp_path: Path) -> None:
|
||||
local = LocalBackend(tmp_path / "local", backend_id="local")
|
||||
archive = LocalBackend(tmp_path / "archive", backend_id="archive")
|
||||
dp = InProcessDataPlane(
|
||||
{"local": local, "archive": archive},
|
||||
default_backend_id="local",
|
||||
)
|
||||
|
||||
result = await dp.ingest_stream(
|
||||
_stream(b"route-me"),
|
||||
hints=IngestHints(backend_id="archive"),
|
||||
)
|
||||
|
||||
assert result.receipt.backend_id == "archive"
|
||||
assert not (local.root / result.receipt.object_key).exists()
|
||||
assert (archive.root / result.receipt.object_key).exists()
|
||||
|
||||
|
||||
async def test_serve_missing_object_propagates_object_not_found(
|
||||
dataplane: InProcessDataPlane,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user