feat(storage): add S3 snapshot service and comprehensive tests for phases 2-3

Adds S3-compatible snapshot storage (Alarik) with AWS Signature V4,
upload, thumbnail, and delete operations. Backfills Phase 2 & 3 with
27 new tests covering camera assignment strategies, event CRUD with
filtering, snapshot attachment, and API contract validation.

- SnapshotService with S3 REST API via HttpClient + SigV4 signing
- 10 unit tests for CameraAssignmentService (assign, release, failover, history)
- 9 unit tests for CameraEventService (create, query, filter, delete, snapshot)
- 8 integration tests for AssignmentsController + EventsController
- SnapshotService registration with 5-min timeout HTTP client
This commit is contained in:
Arnaud Dartois committed 2026-07-19 13:14:05 +00:00
1 parent 358443ff1a
commit 8ac8baf20a
7 files changed
+725

No files matched your search

@@ -98,6 +98,10 @@ public static class DependencyInjection
// Event services
services.AddScoped<ICameraEventService, CameraEventService>();
services.AddSingleton<ISnapshotService, SnapshotService>();
// HTTP client for snapshot uploads (no default timeout)
services.AddHttpClient("Snapshot", c => c.Timeout = TimeSpan.FromMinutes(5));
return services;
}